diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml deleted file mode 100644 index 4120bd3c..00000000 --- a/.github/workflows/linting.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Linting - -on: - push: - branches: - - master - - dev - pull_request: - types: [opened, reopened, synchronize] - -jobs: - linting: - name: Run linters - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install Node.js - uses: actions/setup-node@v1 - with: - node-version: 16 - - - name: Install Yarn packages - run: yarn install - - - name: Run linters - run: yarn lint:strict diff --git a/.github/workflows/linting_testing.yml b/.github/workflows/linting_testing.yml new file mode 100644 index 00000000..cc411b93 --- /dev/null +++ b/.github/workflows/linting_testing.yml @@ -0,0 +1,40 @@ +name: Linting and Testing + +on: + push: + branches: + - master + - dev + pull_request: + types: [opened, reopened, synchronize] + +jobs: + linting: + name: Run Linters + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Node.js + uses: actions/setup-node@v1 + with: + node-version: 16 + + - name: Install Yarn packages + run: yarn install + + - name: Run ESLint Report + run: yarn lint:report + # continue on error, so it still reports it in the next step + continue-on-error: true + + - name: Annotate Code Linting Results + uses: ataylorme/eslint-annotate-action@v2 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + report-json: "eslint_report.json" + + - name: Build Project + run: npm run build diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml deleted file mode 100644 index 76a21607..00000000 --- a/.github/workflows/testing.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Testing - -on: - push: - branches: - - dev - pull_request: - types: [opened, reopened, synchronize] - -permissions: read-all - -jobs: - build: - name: Build - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install Node.js - uses: actions/setup-node@v1 - with: - node-version: 16 - - - name: Install Yarn packages - run: yarn install - - - name: Build project - run: yarn build diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..118c0efb --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "dbaeumer.vscode-eslint", + "editorconfig.editorconfig" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 490d5da2..8ef45565 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,7 @@ { "files.eol": "\n", "editor.detectIndentation": false, + "editor.tabSize": 2, "editor.formatOnSave": true, - "editor.tabSize": 2 + "editor.defaultFormatter": "dbaeumer.vscode-eslint", } \ No newline at end of file diff --git a/package.json b/package.json index 4807d235..f264ca15 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "build": "vite build", "preview": "vite preview", "lint": "eslint --ext .tsx,.ts src", - "lint:strict": "eslint --ext .tsx,.ts --max-warnings 0 src" + "lint:strict": "eslint --ext .tsx,.ts --max-warnings 0 src", + "lint:report": "eslint --ext .tsx,.ts --output-file eslint_report.json --format json src" }, "browserslist": { "production": [ diff --git a/src/App.tsx b/src/App.tsx index b427c62e..ee2a9599 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,7 +12,7 @@ function App() { - +