about summary refs log tree commit diff
path: root/.github/workflows/lint-js.yml
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-02-03 19:07:58 +0100
committerClaire <claire.github-309c@sitedethib.com>2023-02-03 19:23:27 +0100
commitaeacebb3d75112d0d22b9829813c388eef6ce5af (patch)
tree98fced042da7c37db7b401eb197cc44c7aa1a41c /.github/workflows/lint-js.yml
parentec26f7c1b16ca1429991212292e35e520c617485 (diff)
parent79ca19e9b2e701d98c80afd939a98c2a3ef74830 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `.github/workflows/build-image.yml`:
  Upstream updated `docker/build-push-action`, and we a different config
  for `docker/metadata-action` so the lines directly above were different,
  but it's not a real conflict.
  Upgraded `docker/build-push-action` as upstream did.
- `app/javascript/mastodon/features/compose/components/compose_form.js`:
  Upstream changed the codestyle near a line we had modified to accommodate
  configurable character count.
  Kept our change.
Diffstat (limited to '.github/workflows/lint-js.yml')
-rw-r--r--.github/workflows/lint-js.yml40
1 files changed, 40 insertions, 0 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