Skip to content

Commit 4828b59

Browse files
committed
Include ESLint in GitHub Actions workflow
1 parent 1a4cc7a commit 4828b59

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,23 @@ jobs:
2222
run: npm ci
2323
- name: Run Vitest tests
2424
run: npm test
25+
26+
lint:
27+
runs-on: ubuntu-latest
28+
name: Lint
29+
steps:
30+
- name: Checkout the repository
31+
uses: actions/checkout@v4
32+
- name: Set up Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version-file: .tool-versions
36+
cache: npm
37+
- name: Install dependencies
38+
run: npm ci
39+
- name: Run ESLint
40+
run: npm run lint
41+
2542
docs:
2643
runs-on: ubuntu-latest
2744
name: Docs check
@@ -44,6 +61,7 @@ jobs:
4461
git diff --ignore-space-at-eol --text docs/*.md README.md
4562
exit 1
4663
fi
64+
4765
format:
4866
runs-on: ubuntu-latest
4967
name: Format check

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
"scripts": {
1919
"prepare": "husky install",
2020
"test": "vitest run",
21+
"test:watch": "vitest",
2122
"lint": "eslint .",
23+
"lint:fix": "eslint . --fix",
24+
"format": "prettier --write .",
25+
"format:check": "prettier --check .",
2226
"docs": "node scripts/docs.js",
2327
"release": "release-it"
2428
},

0 commit comments

Comments
 (0)