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

Eslint test #5742

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8f6b812
Delete ossary-analysis.yml
May 24, 2024
cab2b09
Add ESLint GitHub workflow
May 24, 2024
59f22ee
Merge branch 'master' into issue-5681-replace-ossar-with-eslint-workflow
martgil May 24, 2024
97e59be
Install ESLint version 8.57.0
May 24, 2024
9d5c223
Install eslint-formatter-sarif version 3.1.0
May 24, 2024
4f747a6
Fix syntax error
May 24, 2024
3901399
Use upload-sarif version 3
May 24, 2024
46fc54f
Use existing npm script "test_eslint"
May 24, 2024
21ee7a4
Update "Run ESLint" commands
May 24, 2024
59bcea4
Merge branch 'master' into issue-5681-replace-ossar-with-eslint-workflow
martgil May 24, 2024
fae6c13
Merge branch 'master' into issue-5681-replace-ossar-with-eslint-workflow
martgil May 24, 2024
ed350de
Merge branch 'master' into issue-5681-replace-ossar-with-eslint-workflow
martgil May 26, 2024
876c442
Temporary hotfix: add eslint-sarif-formatter.js
May 26, 2024
b9aebc7
Temporary hotfix: use modified version of @microsoft/eslint-formatter…
May 26, 2024
024d13e
Add debug code
May 26, 2024
3fb92c0
Add write permission on actions tab
May 26, 2024
216ca59
Add write permissions to contents
May 26, 2024
72ecf55
Add debug code: check file writing capability
May 26, 2024
ad6df78
Add debug code: add continue-on-error
May 26, 2024
e986152
Fix typo
May 26, 2024
e06fa98
Add debug code: add alternative output writing method
May 26, 2024
36aff37
Add debug code: read eslint-results.sarif
May 26, 2024
4a46d2d
Add debug code: try other file writing method
May 26, 2024
000acaa
Add debug code: add more debug code
May 26, 2024
9795943
Install utf8 module
May 26, 2024
de67f64
Add reported missing node module
May 26, 2024
e921798
cleanup
May 26, 2024
53146d7
Specify pull requests on master branch
May 26, 2024
132aa44
cleanup
May 26, 2024
7b5ca64
Add write permissions on contents
May 26, 2024
b41b466
cleanup
May 26, 2024
efcc9ef
cleanup
May 26, 2024
9963b4b
Replace reduce() with for...of
May 27, 2024
6b6ea23
Merge branch 'master' into issue-5681-replace-ossar-with-eslint-workflow
martgil May 27, 2024
2d4dfdf
wip
sosnovsky May 27, 2024
970168f
wip
sosnovsky May 27, 2024
4ac12b2
wip
sosnovsky May 27, 2024
6f2441d
wip
sosnovsky May 27, 2024
61cff3b
wip
sosnovsky May 27, 2024
7c3dc37
wip
sosnovsky May 27, 2024
992ccf0
wip
sosnovsky May 27, 2024
196549e
fix
sosnovsky May 27, 2024
764daf2
wip
sosnovsky May 27, 2024
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
52 changes: 52 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# 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

name: ESLint

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
eslint:
name: Run eslint scanning
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v4
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
with:
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

- name: Install ESLint
run: |
npm ci --ignore-scripts
npm install @microsoft/[email protected]

- name: Run ESLint
run: SARIF_ESLINT_IGNORE_SUPPRESSED=true npm run test_eslint_ci
continue-on-error: true

- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: eslint-results.sarif
wait-for-processing: true
61 changes: 0 additions & 61 deletions .github/workflows/ossar-analysis.yml

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"test_local_chrome_consumer_mock_headless": "xvfb-run npm run test_local_chrome_consumer_mock",
"test_stylelint": "stylelint extension/css/cryptup.css extension/css/settings.css extension/css/webmail.css && stylelint extension/**/*.htm --custom-syntax postcss-html",
"test_eslint": "eslint --ext ts extension test tooling",
"test_eslint_ci": "npm run test_eslint -- --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif",
"test_patterns": "node build/test/test/source/patterns.js",
"test_async_stack": "node build/test/test/source/async-stack.js",
"test_buf": "npx ava --timeout=3m --verbose --concurrency=10 build/test/test/source/buf.js",
Expand Down
Loading