Skip to content

Commit

Permalink
Add knip + config
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Dec 19, 2023
1 parent 299f9ec commit 0ec385b
Show file tree
Hide file tree
Showing 3 changed files with 3,825 additions and 95 deletions.
34 changes: 34 additions & 0 deletions knip.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "https://unpkg.com/knip@3/schema.json",
"entry": [
"src/*/_namespaces/*.ts",

"Herebyfile.mjs",
// Knip does not understand Herebyfile.mjs (a new Knip plugin could probably handle it), so we add the entry files manually:
"src/cancellationToken/cancellationToken.ts",
"src/typingsInstaller/nodeTypingsInstaller.ts",
"src/tsc/tsc.ts",
"src/tsserver/server.ts",
"src/typescript/typescript.ts",
"src/watchGuard/watchGuard.ts",

// src/testRunner/tests.ts does not export anything, so we add all test files separately instead:
"src/testRunner/unittests/**/*.ts",

// The rest of the entry files, mostly to track used dependencies:
".eslintplugin.js",
".gulp.js",
"scripts/eslint/{rules,tests}/*.cjs",
"scripts/*.{cjs,mjs}"
],
"ignore": [
"src/lib/**",
"tests/**"
],
"ignoreDependencies": ["c8", "eslint-formatter-autolinkable-stylish", "mocha-fivemat-progress-reporter"],
"ignoreExportsUsedInFile": {
"enum": true,
"interface": true,
"type": true
}
}
Loading

0 comments on commit 0ec385b

Please sign in to comment.