@kitschpatrol/knip-config 5.1.0 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +37 -19
- package/dist/index.js +14 -0
- package/package.json +1 -1
- package/readme.md +5 -21
package/bin/cli.js
CHANGED
|
@@ -5552,7 +5552,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
5552
5552
|
var yargs_default = Yargs;
|
|
5553
5553
|
|
|
5554
5554
|
// ../../package.json
|
|
5555
|
-
var version = "5.
|
|
5555
|
+
var version = "5.3.0";
|
|
5556
5556
|
|
|
5557
5557
|
// ../../src/execa-utilities.ts
|
|
5558
5558
|
function isErrorExecaError(error) {
|
|
@@ -6249,7 +6249,11 @@ var sharedKnipConfig = {
|
|
|
6249
6249
|
"kpi-cspell",
|
|
6250
6250
|
"kpi-knip",
|
|
6251
6251
|
"kpi-remark",
|
|
6252
|
-
"kpi-prettier"
|
|
6252
|
+
"kpi-prettier",
|
|
6253
|
+
// 1Password CLI, typically a global install...
|
|
6254
|
+
"op",
|
|
6255
|
+
// GitHub CLI, typically a global install...
|
|
6256
|
+
"gh"
|
|
6253
6257
|
],
|
|
6254
6258
|
ignoreDependencies: [
|
|
6255
6259
|
"@kitschpatrol/cspell-config",
|
|
@@ -6258,7 +6262,17 @@ var sharedKnipConfig = {
|
|
|
6258
6262
|
"@kitschpatrol/mdat-config",
|
|
6259
6263
|
"@kitschpatrol/prettier-config",
|
|
6260
6264
|
"@kitschpatrol/remark-config",
|
|
6261
|
-
"@kitschpatrol/stylelint-config"
|
|
6265
|
+
"@kitschpatrol/stylelint-config",
|
|
6266
|
+
"@prettier/plugin-php",
|
|
6267
|
+
"@prettier/plugin-ruby",
|
|
6268
|
+
"@prettier/plugin-xml",
|
|
6269
|
+
"prettier-plugin-packagejson",
|
|
6270
|
+
"prettier-plugin-sh",
|
|
6271
|
+
"prettier-plugin-sql",
|
|
6272
|
+
"prettier-plugin-tailwindcss",
|
|
6273
|
+
"prettier-plugin-toml",
|
|
6274
|
+
// Undetected due to string import in cspell.config.js
|
|
6275
|
+
"@kitschpatrol/dict-en-wiktionary"
|
|
6262
6276
|
]
|
|
6263
6277
|
};
|
|
6264
6278
|
var index_default = sharedKnipConfig;
|
|
@@ -6284,22 +6298,26 @@ function getKnipPackageJsonObject() {
|
|
|
6284
6298
|
}
|
|
6285
6299
|
var commandDefinition = {
|
|
6286
6300
|
commands: {
|
|
6287
|
-
fix
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
},
|
|
6301
|
+
// In practice, Knip's auto-fix behavior is too dangerous for most projects.
|
|
6302
|
+
// Since kpi doesn't currently have per-tool configuration options, we'll
|
|
6303
|
+
// just disable `kpi-knip fix` for now.
|
|
6304
|
+
//
|
|
6305
|
+
// fix: {
|
|
6306
|
+
// commands: [
|
|
6307
|
+
// {
|
|
6308
|
+
// cwdOverride: 'workspace-root',
|
|
6309
|
+
// name: 'knip',
|
|
6310
|
+
// optionFlags: [
|
|
6311
|
+
// '--fix',
|
|
6312
|
+
// '--allow-remove-files',
|
|
6313
|
+
// '--no-config-hints',
|
|
6314
|
+
// ...getWorkspaceOptionFlags(),
|
|
6315
|
+
// ],
|
|
6316
|
+
// },
|
|
6317
|
+
// ],
|
|
6318
|
+
// description: `Automatically remove unused code and dependencies. ${DESCRIPTION.packageRun} ${DESCRIPTION.monorepoRun}`,
|
|
6319
|
+
// positionalArgumentMode: 'none',
|
|
6320
|
+
// },
|
|
6303
6321
|
init: {
|
|
6304
6322
|
configFile: "knip.config.ts",
|
|
6305
6323
|
configPackageJson: getKnipPackageJsonObject(),
|
package/dist/index.js
CHANGED
|
@@ -29,6 +29,10 @@ const sharedKnipConfig = {
|
|
|
29
29
|
'kpi-knip',
|
|
30
30
|
'kpi-remark',
|
|
31
31
|
'kpi-prettier',
|
|
32
|
+
// 1Password CLI, typically a global install...
|
|
33
|
+
'op',
|
|
34
|
+
// GitHub CLI, typically a global install...
|
|
35
|
+
'gh',
|
|
32
36
|
],
|
|
33
37
|
ignoreDependencies: [
|
|
34
38
|
'@kitschpatrol/cspell-config',
|
|
@@ -38,6 +42,16 @@ const sharedKnipConfig = {
|
|
|
38
42
|
'@kitschpatrol/prettier-config',
|
|
39
43
|
'@kitschpatrol/remark-config',
|
|
40
44
|
'@kitschpatrol/stylelint-config',
|
|
45
|
+
'@prettier/plugin-php',
|
|
46
|
+
'@prettier/plugin-ruby',
|
|
47
|
+
'@prettier/plugin-xml',
|
|
48
|
+
'prettier-plugin-packagejson',
|
|
49
|
+
'prettier-plugin-sh',
|
|
50
|
+
'prettier-plugin-sql',
|
|
51
|
+
'prettier-plugin-tailwindcss',
|
|
52
|
+
'prettier-plugin-toml',
|
|
53
|
+
// Undetected due to string import in cspell.config.js
|
|
54
|
+
'@kitschpatrol/dict-en-wiktionary',
|
|
41
55
|
],
|
|
42
56
|
};
|
|
43
57
|
/**
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -103,12 +103,11 @@ Usage:
|
|
|
103
103
|
kpi-knip <command>
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
| Command | Description
|
|
107
|
-
| -------------- |
|
|
108
|
-
| `init` | Initialize by copying starter config files to your project root or to your package.json file.
|
|
109
|
-
| `lint` | Check for unused code and dependencies. Package-scoped. In a monorepo, it will also run in all packages below the current working directory.
|
|
110
|
-
| `
|
|
111
|
-
| `print-config` | Print the effective Knip configuration. Package-scoped. Searches up to the root of a monorepo if necessary. |
|
|
106
|
+
| Command | Description |
|
|
107
|
+
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
108
|
+
| `init` | Initialize by copying starter config files to your project root or to your package.json file. |
|
|
109
|
+
| `lint` | Check for unused code and dependencies. Package-scoped. In a monorepo, it will also run in all packages below the current working directory. |
|
|
110
|
+
| `print-config` | Print the effective Knip configuration. Package-scoped. Searches up to the root of a monorepo if necessary. |
|
|
112
111
|
|
|
113
112
|
| Option | Description | Type |
|
|
114
113
|
| ------------------- | ------------------- | --------- |
|
|
@@ -148,21 +147,6 @@ kpi-knip lint
|
|
|
148
147
|
| `--help`<br>`-h` | Show help | `boolean` |
|
|
149
148
|
| `--version`<br>`-v` | Show version number | `boolean` |
|
|
150
149
|
|
|
151
|
-
#### Subcommand: `kpi-knip fix`
|
|
152
|
-
|
|
153
|
-
Automatically remove unused code and dependencies. Package-scoped. In a monorepo, it will also run in all packages below the current working directory.
|
|
154
|
-
|
|
155
|
-
Usage:
|
|
156
|
-
|
|
157
|
-
```txt
|
|
158
|
-
kpi-knip fix
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
| Option | Description | Type |
|
|
162
|
-
| ------------------- | ------------------- | --------- |
|
|
163
|
-
| `--help`<br>`-h` | Show help | `boolean` |
|
|
164
|
-
| `--version`<br>`-v` | Show version number | `boolean` |
|
|
165
|
-
|
|
166
150
|
#### Subcommand: `kpi-knip print-config`
|
|
167
151
|
|
|
168
152
|
Print the effective Knip configuration. Package-scoped. Searches up to the root of a monorepo if necessary.
|