From c8ff288fb09a1c5be2aaae6fbc73a692ae3ed7d1 Mon Sep 17 00:00:00 2001 From: Dennis Li Date: Thu, 22 Feb 2024 13:29:25 -0800 Subject: [PATCH] Adding linter workflow to run on PRs. --- .github/workflows/run-lint.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/run-lint.yml diff --git a/.github/workflows/run-lint.yml b/.github/workflows/run-lint.yml new file mode 100644 index 00000000..dca209cf --- /dev/null +++ b/.github/workflows/run-lint.yml @@ -0,0 +1,25 @@ +name: Lint +on: + pull_request: + types: [opened, synchronize, reopened] + paths: + - '**.js' + +jobs: + run-lint: + name: Running eslint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: 18 + + - name: Install dependencies + run: npm ci + + - name: Run eslint on changed files + uses: tj-actions/eslint-changed-files@v20 + with: + config_path: '.eslintrc.js'