-
Notifications
You must be signed in to change notification settings - Fork 7
43 lines (36 loc) · 1.01 KB
/
js-linting.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: JavaScript Linting
on:
push:
branches:
- trunk
paths:
- "**.js"
- "**.mjs"
- .github/workflows/js-linting.yml
pull_request:
paths:
- "**.js"
- "**.mjs"
- .github/workflows/js-linting.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 2
jobs:
JSLintingCheck:
name: Lint JavaScript
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Prepare node
uses: woocommerce/grow/prepare-node@actions-v1
with:
node-version-file: .nvmrc
- name: Prepare annotation formatter
uses: woocommerce/grow/eslint-annotation@actions-v1
# Turn off import/no-unresolved rule since this check doesn't install packages for all sub-packages.
- name: Lint JavaScript and annotate linting errors
run: |
npm run lint:js -- --rule 'import/no-unresolved: 0' --format ./eslintFormatter.cjs