Skip to content

Commit ea80534

Browse files
committed
update linter
1 parent 5f740e0 commit ea80534

File tree

4 files changed

+1748
-392
lines changed

4 files changed

+1748
-392
lines changed

.github/workflows/lint.yml

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,38 @@
11
name: Lint
22

33
on:
4-
# Trigger the workflow on push or pull request,
5-
# but only for the main branch
6-
push:
7-
branches:
8-
- master
94
pull_request:
105
branches:
116
- master
127

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
1315
jobs:
14-
run-linters:
15-
name: Run linters
16+
lint:
17+
name: Lint
18+
timeout-minutes: 30
1619
runs-on: ubuntu-latest
17-
1820
steps:
19-
- name: Check out Git repository
20-
uses: actions/checkout@v3
21-
22-
- name: Set up Node.js
23-
uses: actions/setup-node@v1
24-
with:
25-
node-version: 12
26-
27-
# ESLint and Prettier must be in `package.json`
28-
- name: Install Node.js dependencies
29-
run: npm ci
30-
31-
- name: Run linters
32-
uses: wearerequired/lint-action@v2
21+
- name: Checkout
22+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
23+
- name: Set up Node
24+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
3325
with:
34-
eslint: true
35-
prettier: true
26+
node-version: '18'
27+
cache: yarn
28+
- name: Installation
29+
run: yarn
30+
# run: yarn install --immutable # Fails if yarn.lock is modified (unfortunately only works for Yarn 2, and --frozen-lockfile is not the same!)
31+
- name: Check immutable yarn.lock
32+
run: git diff --exit-code
33+
- name: Lint
34+
run: |
35+
echo "::add-matcher::.github/workflows/cspell-problem-matcher.json"
36+
yarn lint:ci
37+
- name: Prettier Code
38+
run: yarn format:diff

0 commit comments

Comments
 (0)