Skip to content

Commit

Permalink
Update eslint.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nawed2611 committed Mar 30, 2023
1 parent b071c6e commit c3f8ca6
Showing 1 changed file with 12 additions and 30 deletions.
42 changes: 12 additions & 30 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,22 @@ name: ESLint

on:
push:
branches: [ "master" ]
branches: ["master"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
branches: ["master"]
schedule:
- cron: '40 23 * * 1'
- cron: "40 23 * * 1"

jobs:
eslint:
name: Run eslint scanning
test:
name: Check the source code
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@v3

- name: Install ESLint
run: |
npm install [email protected]
npm install @microsoft/[email protected]
- name: Run ESLint
run: npx eslint .
--config .eslintrc.js
--ext .js,.jsx,.ts,.tsx
--format @microsoft/eslint-formatter-sarif
--output-file eslint-results.sarif
continue-on-error: true

- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: eslint-results.sarif
wait-for-processing: true
- uses: actions/checkout@v2
- name: Install packages
run: npm ci
- name: Prettier
run: npm run format
- name: Lint
run: npm run lint

0 comments on commit c3f8ca6

Please sign in to comment.