Skip to content

Commit 88a787e

Browse files
authored
chore: add knip (#482)
1 parent e80cc81 commit 88a787e

8 files changed

Lines changed: 632 additions & 17 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- run: yarn install
1717
- run: yarn lint
1818
- run: yarn fmt:check
19+
- run: yarn knip
1920

2021
build:
2122
runs-on: ${{ matrix.os }}

‎.lefthook.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ pre-commit:
77
- run: mise exec -- yarn build
88
- run: mise exec -- yarn install --mode=update-lockfile && git add yarn.lock
99
- run: mise exec -- yarn test/ install --mode=update-lockfile && git add test/yarn.lock
10+
- run: mise exec -- yarn knip

‎knip.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@6/schema.json",
3+
"tags": ["-lintignore"],
4+
"entry": ["test/config.ts", "test/prepare.mjs", "test/tests/**/*.test.ts"],
5+
"ignoreDependencies": ["@types/ts-expose-internals"],
6+
"ignore": ["examples/**/*", "test/projects/**/*"]
7+
}

‎package.json‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"clean:all": "yarn clean && rm -rf node_modules \"**/node_modules\" \"**/yarn.lock\" yarn.lock",
3030
"reset": "yarn clean:all && yarn install && yarn build",
3131
"-------------- ": "",
32-
"prepack": "yarn build"
32+
"prepack": "yarn build",
33+
"knip": "knip"
3334
},
3435
"keywords": [
3536
"typescript",
@@ -57,10 +58,10 @@
5758
],
5859
"devDependencies": {
5960
"@tsconfig/bases": "^1.0.16",
60-
"@types/minimatch": "^5.1.2",
6161
"@types/node": "^25.0.3",
6262
"@types/ts-expose-internals": "npm:ts-expose-internals@4.9.5",
6363
"changelogen": "^0.6.2",
64+
"knip": "^6.29.0",
6465
"oxfmt": "^0.60.0",
6566
"oxlint": "^1.75.0",
6667
"ts-patch": "^3.3.0",

‎src/types.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import type { CompilerOptions, EmitHost, Pattern, SourceFile } from "typescript"
88
/* ****************************************************************************************************************** */
99

1010
export type ImportOrExportDeclaration = ts.ImportDeclaration | ts.ExportDeclaration;
11-
export type ImportOrExportClause = ts.ImportDeclaration["importClause"] | ts.ExportDeclaration["exportClause"];
1211

1312
// endregion
1413

‎test/utils/index.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
export * from "./helpers.ts";
2-
export * from "./module-not-found-error.ts";

‎test/utils/module-not-found-error.ts‎

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)