Skip to content

Commit e534015

Browse files
ci: add knip
1 parent a1dbdc1 commit e534015

3 files changed

Lines changed: 421 additions & 89 deletions

File tree

.github/workflows/lint.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Code Linting
33
on: push
44

55
jobs:
6-
lint:
6+
eslint:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
node-version: [20]
10+
node-version: [22]
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: pnpm/action-setup@v4
@@ -20,3 +20,20 @@ jobs:
2020
run: pnpm install --frozen-lockfile
2121
- name: Run ESLint
2222
run: pnpm run lint
23+
knip:
24+
runs-on: ubuntu-latest
25+
strategy:
26+
matrix:
27+
node-version: [22]
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: pnpm/action-setup@v4
31+
- name: Use Node.js ${{ matrix.node-version }}
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: ${{ matrix.node-version }}
35+
cache: 'pnpm'
36+
- name: Install dependencies
37+
run: pnpm install --frozen-lockfile
38+
- name: Run knip
39+
run: pnpm run knip

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"build-storybook": "storybook build",
1313
"test-storybook": "test-storybook",
1414
"chromatic": "chromatic --exit-zero-on-changes",
15-
"format:check": "prettier --check ."
15+
"format:check": "prettier --check .",
16+
"knip": "knip"
1617
},
1718
"dependencies": {
1819
"@tanstack/react-router": "1.22.3",
@@ -48,6 +49,7 @@
4849
"eslint-plugin-react-hooks": "^4.6.0",
4950
"eslint-plugin-react-refresh": "^0.4.5",
5051
"eslint-plugin-storybook": "^0.8.0",
52+
"knip": "^5.59.1",
5153
"prettier": "3.2.5",
5254
"prettier-plugin-css-order": "2.0.1",
5355
"storybook": "^8.0.4",
@@ -56,5 +58,5 @@
5658
},
5759
"readme": "ERROR: No README data found!",
5860
"_id": "auth-components@0.0.0",
59-
"packageManager": "pnpm@9.6.0"
61+
"packageManager": "pnpm@10.11.0"
6062
}

0 commit comments

Comments
 (0)