Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload ESLint results to code scanning #3709

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 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,21 @@ jobs:
run: |
npm run find-deadcode

- name: Lint
if: "${{ !cancelled() }}"
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.3.0",
"@storybook/addon-actions": "^8.3.0",
Expand Down
Loading