Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
github: add eslint action
Browse files Browse the repository at this point in the history
  • Loading branch information
adil192 committed Nov 12, 2023
1 parent d1ef136 commit 381d7cf
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: ESLint

on:
push:
branches: [ "main" ]
paths:
- "scripts/**"
- ".eslintrc.js"
- ".github/workflows/eslint.yml"
pull_request:
branches: [ "main" ]
paths:
- "scripts/**"
- ".eslintrc.js"
- ".github/workflows/eslint.yml"
schedule:
# Run at 1:45am every Wednesday
- cron: '45 1 * * 3'
workflow_dispatch:

jobs:
eslint:
name: Run eslint scanning
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
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 scripts
--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

0 comments on commit 381d7cf

Please sign in to comment.