Skip to content

Commit 1ddd9d4

Browse files
authored
Add knip (#104)
1 parent c381734 commit 1ddd9d4

5 files changed

Lines changed: 367 additions & 32 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ jobs:
4747
run: yarn format:check
4848

4949
- name: Run lint
50-
run: yarn lint:ci
50+
run: yarn lint:js:ci
51+
52+
- name: Run knip
53+
run: yarn lint:knip
5154

5255
- name: Run typecheck
5356
run: yarn typecheck

.oxlintrc.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"no-warning-comments": "off",
2222
"sort-keys": "off",
2323

24+
"vitest/no-conditional-in-test": "off",
2425
"jest/no-conditional-in-test": "off",
2526

2627
"typescript/array-type": ["error", { "default": "generic", "readonly": "generic" }],

package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,23 @@
88
"scripts": {
99
"format": "oxfmt",
1010
"format:check": "oxfmt --check",
11-
"lint": "oxlint",
12-
"lint:fix": "oxlint --fix",
13-
"lint:ci": "oxlint --format=github",
11+
"lint": "yarn lint:js && yarn lint:knip",
12+
"lint:js": "oxlint",
13+
"lint:js:fix": "oxlint --fix",
14+
"lint:js:ci": "oxlint --format=github",
15+
"lint:knip": "knip",
1416
"typecheck": "tsc --noEmit",
1517
"test": "vitest"
1618
},
1719
"dependencies": {
1820
"@changesets/assemble-release-plan": "^6.0.2",
1921
"@changesets/config": "^3.0.1",
22+
"@changesets/errors": "^0.2.0",
2023
"@changesets/parse": "^0.4.0",
2124
"@changesets/types": "^6.0.0",
2225
"@manypkg/get-packages": "^1.1.3",
26+
"@octokit/webhooks": "^9.8.4",
27+
"@sentry/node": "^6.0.0",
2328
"@types/js-yaml": "^3.12.2",
2429
"@types/markdown-table": "^2.0.0",
2530
"@types/micromatch": "^4.0.1",
@@ -30,15 +35,16 @@
3035
"human-id": "^1.0.2",
3136
"js-yaml": "^3.14.0",
3237
"markdown-table": "^2.0.0",
38+
"micromatch": "^4.0.2",
3339
"next": "^12.1.6",
3440
"node-fetch": "^2.6.1",
35-
"path": "^0.12.7",
3641
"probot": "^12.2.4",
3742
"react": "^18.2.0",
3843
"react-dom": "^18.2.0",
3944
"typescript": "^6.0.2"
4045
},
4146
"devDependencies": {
47+
"knip": "^6.11.0",
4248
"msw": "^2.12.14",
4349
"oxfmt": "^0.42.0",
4450
"oxlint": "^1.58.0",

test/index.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ describe.concurrent("changeset-bot", () => {
284284
} as never);
285285

286286
const commentRequests = requests.filter(
287-
// oxlint-disable-next-line vitest/no-conditional-in-test
288287
(request) => request.path.includes("/comments") && request.method === "PATCH",
289288
);
290289

0 commit comments

Comments
 (0)