@@ -5,61 +5,61 @@ export const helpText = `✂️ Find unused dependencies, exports and files in
55Usage: knip [options]
66
77Options:
8- -h, --help Print this help text
9- -V, --version Print version
10- -n, --no-progress Don't show dynamic progress updates (automatically enabled in CI environments)
11- -c, --config [file] Configuration file path
12- (default: [.]knip.json[c], knip.(js|ts), knip.config.(js|ts) or package.json#knip)
13- --use-tsconfig-files Use tsconfig.json to define project files (override \`project\` patterns)
14- -t, --tsConfig [file] TypeScript configuration path (default: tsconfig.json)
8+ -h, --help Print this help text
9+ -V, --version Print version
10+ -n, --no-progress Don't show dynamic progress updates (automatically enabled in CI environments)
11+ -c, --config [file] Configuration file path
12+ (default: [.]knip.json[c], knip.(js|ts), knip.config.(js|ts) or package.json#knip)
13+ --use-tsconfig-files Use tsconfig.json to define project files (override \`project\` patterns)
14+ -t, --tsConfig [file] TypeScript configuration path (default: tsconfig.json)
1515
1616Mode
17- --cache Enable caching
18- --cache-location Change cache location (default: node_modules/.cache/knip)
19- --include-entry-exports Include entry files when reporting unused exports
20- --no-gitignore Don't respect .gitignore
21- --production Analyze only production source files (e.g. no test files, devDependencies)
22- --strict Consider only direct dependencies of workspace (not devDependencies, not other workspaces)
23- --watch Watch mode
17+ --cache Enable caching
18+ --cache-location Change cache location (default: node_modules/.cache/knip)
19+ --include-entry-exports Include entry files when reporting unused exports
20+ --no-gitignore Don't respect .gitignore
21+ --production Analyze only production source files (e.g. no test files, devDependencies)
22+ --strict Consider only direct dependencies of workspace (not devDependencies, not other workspaces)
23+ --watch Watch mode
2424
2525Scope
26- -W, --workspace [filter] Filter workspaces by name, directory, or glob (can be repeated)
27- --directory [dir] Run process from a different directory (default: cwd)
28- --include Report only provided issue type(s), can be comma-separated or repeated (1)
29- --exclude Exclude provided issue type(s) from report, can be comma-separated or repeated (1)
30- --dependencies Shortcut for --include dependencies,unlisted,binaries,unresolved,catalog
31- --exports Shortcut for --include exports,nsExports,types,nsTypes,enumMembers,namespaceMembers,duplicates
32- --files Shortcut for --include files
33- --tags Include or exclude tagged exports
26+ -W, --workspace [filter] Filter workspaces by name, directory, or glob (can be repeated)
27+ --directory [dir] Run process from a different directory (default: cwd)
28+ --include Report only provided issue type(s), can be comma-separated or repeated (1)
29+ --exclude Exclude provided issue type(s) from report, can be comma-separated or repeated (1)
30+ --dependencies Shortcut for --include dependencies,unlisted,binaries,unresolved,catalog
31+ --exports Shortcut for --include exports,nsExports,types,nsTypes,enumMembers,namespaceMembers,duplicates
32+ --files Shortcut for --include files
33+ --tags Include or exclude tagged exports
3434
3535Fix
36- --fix Fix issues (modifies files in your repo)
37- --fix-type Fix only issues of type, can be comma-separated or repeated (2)
38- --allow-remove-files Allow Knip to remove files (with --fix)
39- --format Format modified files after --fix using the local formatter
36+ --fix Fix issues (modifies files in your repo)
37+ --fix-type Fix only issues of type, can be comma-separated or repeated (2)
38+ --allow-remove-files Allow Knip to remove files (with --fix)
39+ --format Format modified files after --fix using the local formatter
4040
4141Output
42- --preprocessor Preprocess the results before providing it to the reporter(s), can be repeated
43- --preprocessor-options Pass extra options to the preprocessor (as JSON string, see --reporter-options example)
44- --reporter Select reporter (default: symbols), can be repeated (3)
45- --reporter-options Pass extra options to the reporter (as JSON string, see example)
46- --no-config-hints Suppress configuration hints
47- --treat-config-hints-as-errors Exit with non-zero code (1) if there are any configuration hints
48- --max-issues Maximum number of total issues before non-zero exit code (default: 0)
49- --max-show-issues Maximum number of issues to display per type
50- --no-exit-code Always exit with code zero (0)
42+ --preprocessor Preprocess the results before providing it to the reporter(s), can be repeated
43+ --preprocessor-options Pass extra options to the preprocessor (as JSON string, see --reporter-options example)
44+ --reporter Select reporter (default: symbols), can be repeated (3)
45+ --reporter-options Pass extra options to the reporter (as JSON string, see example)
46+ --no-config-hints Suppress configuration hints
47+ --treat-config-hints-as-errors Exit with non-zero code (1) if there are any configuration hints
48+ --max-issues Maximum number of total issues before non-zero exit code (default: 0)
49+ --max-show-issues Maximum number of issues to display per type
50+ --no-exit-code Always exit with code zero (0)
5151
5252Troubleshooting
53- -d, --debug Show debug output
54- --memory Measure memory usage and display data table
55- --memory-realtime Log memory usage in realtime
56- --performance Measure count and running time of key functions and display stats table
57- --performance-fn [name] Measure only function [name]
58- --duration Print total running time (zero overhead, no instrumentation)
59- --trace Show trace output
60- --trace-dependency [name] Show files that import the named dependency
61- --trace-export [name] Show trace output for named export(s)
62- --trace-file [file] Show trace output for exports in file
53+ -d, --debug Show debug output
54+ --memory Measure memory usage and display data table
55+ --memory-realtime Log memory usage in realtime
56+ --performance Measure count and running time of key functions and display stats table
57+ --performance-fn [name] Measure only function [name]
58+ --duration Print total running time (zero overhead, no instrumentation)
59+ --trace Show trace output
60+ --trace-dependency [name] Show files that import the named dependency
61+ --trace-export [name] Show trace output for named export(s)
62+ --trace-file [file] Show trace output for exports in file
6363
6464(1) Issue types: files, dependencies, unlisted, unresolved, exports, nsExports, types, nsTypes, enumMembers, namespaceMembers, duplicates, catalog
6565(2) Fixable issue types: dependencies, exports, types, files, catalog
@@ -99,7 +99,6 @@ export default function parseCLIArgs() {
9999 'allow-remove-files' : { type : 'boolean' } ,
100100 help : { type : 'boolean' , short : 'h' } ,
101101 include : { type : 'string' , multiple : true } ,
102-
103102 'include-entry-exports' : { type : 'boolean' } ,
104103 'max-issues' : { type : 'string' } ,
105104 'max-show-issues' : { type : 'string' } ,
0 commit comments