Error Handling #178
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Code Quality Check | |
| on: | |
| push: | |
| branches: ["main", "main-preview"] | |
| pull_request: # Runs on all PRs | |
| jobs: | |
| # ESLint is a tool for identifying and reporting on patterns | |
| # found in ECMAScript/JavaScript code. | |
| # More details at https://github.com/eslint/eslint | |
| # and https://eslint.org | |
| eslint: | |
| name: Run ESLint and Prettier | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| security-events: write # For ESLint SARIF upload | |
| actions: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run ESLint | |
| run: | | |
| npm run lint -- \ | |
| --format node_modules/@microsoft/eslint-formatter-sarif/sarif.js \ | |
| --output-file eslint-results.sarif | |
| continue-on-error: true | |
| - name: Upload SARIF to GitHub | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: eslint-results.sarif |