-
Notifications
You must be signed in to change notification settings - Fork 9
60 lines (49 loc) · 1.4 KB
/
js-css-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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: JavaScript and CSS Linting
on:
push:
branches:
- trunk
- develop
paths:
- "**.js"
- "**.scss"
- .github/workflows/js-css-linting.yml
pull_request:
paths:
- "**.js"
- "**.scss"
- .github/workflows/js-css-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
- name: Lint JavaScript and annotate linting errors
run: npm run lint:js -- --format ./eslintFormatter.cjs
CSSLintingCheck:
name: Lint CSS
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/stylelint-annotation@actions-v1
- name: Lint CSS and annotate linting errors
run: npm run lint:css -- --custom-formatter ./stylelintFormatter.cjs