about summary refs log tree commit diff
path: root/.github/workflows
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-01-29 17:44:03 -0500
committerGitHub <noreply@github.com>2023-01-29 23:44:03 +0100
commitd9088ef3272421a9267467fb95674d4b4afb38ab (patch)
treecaeb7c8efef62874ba04348513c595185fe3b141 /.github/workflows
parent9cdd643564ef1f885a4c501ac0dfc437291466a7 (diff)
Separate ESLint CI from Superlinter (#23029)
* Separate ESLint CI from Superlinter

* Correct JS indenting level

* Remove extra semicolons with ESLint autofix
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/lint-js.yml40
-rw-r--r--.github/workflows/linter.yml2
2 files changed, 40 insertions, 2 deletions
diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml
new file mode 100644
index 000000000..49d989771
--- /dev/null
+++ b/.github/workflows/lint-js.yml
@@ -0,0 +1,40 @@
+name: JavaScript Linting
+on:
+  push:
+    branches-ignore:
+      - 'dependabot/**'
+    paths:
+      - 'package.json'
+      - 'yarn.lock'
+      - '.prettier*'
+      - '.eslint*'
+      - '**/*.js'
+      - '.github/workflows/lint-js.yml'
+
+  pull_request:
+    paths:
+      - 'package.json'
+      - 'yarn.lock'
+      - '.prettier*'
+      - '.eslint*'
+      - '**/*.js'
+      - '.github/workflows/lint-js.yml'
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Clone repository
+        uses: actions/checkout@v3
+
+      - name: Set up Node.js
+        uses: actions/setup-node@v3
+        with:
+          cache: yarn
+
+      - name: Install all yarn packages
+        run: yarn --frozen-lockfile
+
+      - name: ESLint
+        run: yarn test:lint:js
diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
index b6438d665..575732845 100644
--- a/.github/workflows/linter.yml
+++ b/.github/workflows/linter.yml
@@ -74,10 +74,8 @@ jobs:
           DEFAULT_BRANCH: main
           NO_COLOR: 1 # https://github.com/xt0rted/stylelint-problem-matcher/issues/360
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.js
           LINTER_RULES_PATH: .
           RUBY_CONFIG_FILE: .rubocop.yml
           VALIDATE_ALL_CODEBASE: false
           VALIDATE_CSS: true
-          VALIDATE_JAVASCRIPT_ES: true
           VALIDATE_RUBY: true