Skip to content

Commit bdc3152

Browse files
committed
Add knip + config
1 parent f2e9ebd commit bdc3152

File tree

3 files changed

+3831
-102
lines changed

3 files changed

+3831
-102
lines changed

knip.jsonc

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

0 commit comments

Comments
 (0)