Skip to content

Commit

Permalink
Upload ESLint results to code scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
aeisenberg committed Sep 12, 2024
1 parent fba62a9 commit 50ddee9
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,6 @@ jobs:
run: |
npm run check-types
- name: Lint
working-directory: extensions/ql-vscode
env:
NODE_OPTIONS: '--max-old-space-size=4096'
run: |
npm run lint
- name: Lint Markdown
working-directory: extensions/ql-vscode
run: |
Expand All @@ -101,6 +94,20 @@ jobs:
run: |
npm run find-deadcode
- name: Lint
working-directory: extensions/ql-vscode
env:
NODE_OPTIONS: '--max-old-space-size=4096'
run: |
npm run lint-ci
- name: Upload ESLint results to Code Scanning
if: "${{ !cancelled() }}"
uses: github/codeql-action/upload-sarif@main
with:
sarif_file: extensions/ql-vscode/build/eslint.sarif
category: eslint

generated:
name: Check generated code
runs-on: ubuntu-latest
Expand Down
31 changes: 31 additions & 0 deletions extensions/ql-vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions extensions/ql-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1953,6 +1953,7 @@
"update-vscode": "node ./node_modules/vscode/bin/install",
"format": "prettier --write **/*.{ts,tsx} && eslint . --ext .ts,.tsx --fix",
"lint": "eslint . --ext .js,.ts,.tsx --max-warnings=0",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint . --ext .js,.ts,.tsx --max-warnings=0 --format @microsoft/eslint-formatter-sarif --output-file=build/eslint.sarif",
"lint:markdown": "markdownlint-cli2 \"../../**/*.{md,mdx}\" \"!**/node_modules/**\" \"!**/.vscode-test/**\" \"!**/build/cli/v*/**\"",
"find-deadcode": "vite-node scripts/find-deadcode.ts",
"format-staged": "lint-staged",
Expand Down Expand Up @@ -2010,6 +2011,7 @@
"@babel/preset-typescript": "^7.21.4",
"@faker-js/faker": "^8.4.1",
"@github/markdownlint-github": "^0.6.2",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@playwright/test": "^1.40.1",
"@storybook/addon-a11y": "^8.2.9",
"@storybook/addon-actions": "^8.2.9",
Expand Down

0 comments on commit 50ddee9

Please sign in to comment.