Skip to content

Commit 0ec385b

Browse files
committed
Add knip + config
1 parent 299f9ec commit 0ec385b

File tree

3 files changed

+3825
-95
lines changed

3 files changed

+3825
-95
lines changed

knip.jsonc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@3/schema.json",
3+
"entry": [
4+
"src/*/_namespaces/*.ts",
5+
6+
"Herebyfile.mjs",
7+
// Knip does not understand Herebyfile.mjs (a new Knip plugin could probably handle it), so we add the entry files manually:
8+
"src/cancellationToken/cancellationToken.ts",
9+
"src/typingsInstaller/nodeTypingsInstaller.ts",
10+
"src/tsc/tsc.ts",
11+
"src/tsserver/server.ts",
12+
"src/typescript/typescript.ts",
13+
"src/watchGuard/watchGuard.ts",
14+
15+
// src/testRunner/tests.ts does not export anything, so we add all test files separately instead:
16+
"src/testRunner/unittests/**/*.ts",
17+
18+
// The rest of the entry files, mostly to track used dependencies:
19+
".eslintplugin.js",
20+
".gulp.js",
21+
"scripts/eslint/{rules,tests}/*.cjs",
22+
"scripts/*.{cjs,mjs}"
23+
],
24+
"ignore": [
25+
"src/lib/**",
26+
"tests/**"
27+
],
28+
"ignoreDependencies": ["c8", "eslint-formatter-autolinkable-stylish", "mocha-fivemat-progress-reporter"],
29+
"ignoreExportsUsedInFile": {
30+
"enum": true,
31+
"interface": true,
32+
"type": true
33+
}
34+
}

0 commit comments

Comments
 (0)