diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6186857..4d0b31d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,8 +10,5 @@ jobs: deploy: uses: Beuterei/reusable-workflows/.github/workflows/deploy-static-app.yml@main with: - bucket_name: test-static-fes - endpoint: nbg1.your-objectstorage.com - secrets: - ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_ID }} - SECRET_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} \ No newline at end of file + project_name: testingsadsdasd + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index db66572..6f58bdb 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -1,4 +1,4 @@ -name: Build and Deploy a static app +name: QA on: pull_request: @@ -19,13 +19,20 @@ jobs: linting: runs-on: ubuntu-latest needs: setup + permissions: + # Default permissions (matching what would be set if the permissions section was missing at all) + contents: read + packages: read + + # Need to add these 2 for eslint-annotate-action + pull-requests: read + checks: write steps: - uses: actions/checkout@v4 with: ref: ${{ github.ref }} - uses: Beuterei/reusable-workflows/.github/actions/restore-dependency-cache@main - - name: + - name: Linting uses: Beuterei/reusable-workflows/.github/actions/eslint-runner@main with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - diff --git a/README.md b/README.md index 74872fd..c34425a 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Currently, two official plugins are available: - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + ## Expanding the ESLint configuration If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: diff --git a/src/App.tsx b/src/App.tsx index 3d7ded3..3ee93f5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,8 +1,10 @@ -import { useState } from 'react' +import React, { useState } from 'react' import reactLogo from './assets/react.svg' import viteLogo from '/vite.svg' import './App.css' +export const a = 1 + function App() { const [count, setCount] = useState(0) @@ -33,3 +35,10 @@ function App() { } export default App + +function ExampleComponent() { + if (true) { + const [state, setState] = React.useState(0); // This breaks the rules of hooks + } + return