This repository has been archived by the owner on Jul 9, 2024. It is now read-only.
Linting #227
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linting | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
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@v4 | |
- name: Install ESLint | |
run: npm install | |
- name: Run ESLint | |
run: npx eslint src/scripts/ | |
--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@v3 | |
with: | |
sarif_file: eslint-results.sarif | |
wait-for-processing: true | |
stylelint: | |
name: Run stylelint scanning | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install stylelint | |
run: npm install | |
- name: Run stylelint | |
run: npx stylelint src/**/*.scss | |
--custom-formatter=node_modules/stylelint-sarif-formatter/index.js | |
-o stylelint-results.sarif | |
continue-on-error: true | |
- name: Upload analysis results to GitHub | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: stylelint-results.sarif | |
wait-for-processing: true |