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
# 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. | |
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | |
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | |
name: "Lint JS files using eslint" | |
on: | |
push: | |
pull_request_target: | |
types: [ opened, reopened ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '14' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Run ESLint and generate SARIF output | |
run: yarn eslint 'app/**/*.js' --format json --output-file eslint-output.json | |
- name: Convert ESLint output to SARIF | |
run: yarn sarif-convert -o eslint-output.sarif eslint-output.json | |
- name: Upload SARIF output | |
uses: github/codeql-action/upload-sarif@v1 | |
with: | |
sarif_file: eslint-output.sarif |