-
Notifications
You must be signed in to change notification settings - Fork 82
46 lines (40 loc) · 1.12 KB
/
lint.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
name: Lint
on: [ push, pull_request ]
jobs:
stylelint_prettier:
name: Stylelint & Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
# Install project dependencies
- name: Install dependencies
run: npm ci
# Run Prettier check command
- name: Run Prettier check
run: |
npm run prettier || {
echo "::error::Prettier check failed. Run 'npm run prettier:fix' to format your code."
exit 1
}
# Run Stylelint check command
- name: Run Stylelint check
run: |
npm run stylelint || {
echo "::error::Stylelint check failed. Run 'npm run stylelint:fix' to autofix issues."
exit 1
}
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Lint js
run: touch ./webpack/.env && npm ci && npm run lint