@kitschpatrol/knip-config 5.1.0 → 5.2.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 +30 -18
- package/dist/index.js +8 -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.2.0";
|
|
5556
5556
|
|
|
5557
5557
|
// ../../src/execa-utilities.ts
|
|
5558
5558
|
function isErrorExecaError(error) {
|
|
@@ -6258,7 +6258,15 @@ var sharedKnipConfig = {
|
|
|
6258
6258
|
"@kitschpatrol/mdat-config",
|
|
6259
6259
|
"@kitschpatrol/prettier-config",
|
|
6260
6260
|
"@kitschpatrol/remark-config",
|
|
6261
|
-
"@kitschpatrol/stylelint-config"
|
|
6261
|
+
"@kitschpatrol/stylelint-config",
|
|
6262
|
+
"@prettier/plugin-php",
|
|
6263
|
+
"@prettier/plugin-ruby",
|
|
6264
|
+
"@prettier/plugin-xml",
|
|
6265
|
+
"prettier-plugin-packagejson",
|
|
6266
|
+
"prettier-plugin-sh",
|
|
6267
|
+
"prettier-plugin-sql",
|
|
6268
|
+
"prettier-plugin-tailwindcss",
|
|
6269
|
+
"prettier-plugin-toml"
|
|
6262
6270
|
]
|
|
6263
6271
|
};
|
|
6264
6272
|
var index_default = sharedKnipConfig;
|
|
@@ -6284,22 +6292,26 @@ function getKnipPackageJsonObject() {
|
|
|
6284
6292
|
}
|
|
6285
6293
|
var commandDefinition = {
|
|
6286
6294
|
commands: {
|
|
6287
|
-
fix
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
},
|
|
6295
|
+
// In practice, Knip's auto-fix behavior is too dangerous for most projects.
|
|
6296
|
+
// Since kpi doesn't currently have per-tool configuration options, we'll
|
|
6297
|
+
// just disable `kpi-knip fix` for now.
|
|
6298
|
+
//
|
|
6299
|
+
// fix: {
|
|
6300
|
+
// commands: [
|
|
6301
|
+
// {
|
|
6302
|
+
// cwdOverride: 'workspace-root',
|
|
6303
|
+
// name: 'knip',
|
|
6304
|
+
// optionFlags: [
|
|
6305
|
+
// '--fix',
|
|
6306
|
+
// '--allow-remove-files',
|
|
6307
|
+
// '--no-config-hints',
|
|
6308
|
+
// ...getWorkspaceOptionFlags(),
|
|
6309
|
+
// ],
|
|
6310
|
+
// },
|
|
6311
|
+
// ],
|
|
6312
|
+
// description: `Automatically remove unused code and dependencies. ${DESCRIPTION.packageRun} ${DESCRIPTION.monorepoRun}`,
|
|
6313
|
+
// positionalArgumentMode: 'none',
|
|
6314
|
+
// },
|
|
6303
6315
|
init: {
|
|
6304
6316
|
configFile: "knip.config.ts",
|
|
6305
6317
|
configPackageJson: getKnipPackageJsonObject(),
|
package/dist/index.js
CHANGED
|
@@ -38,6 +38,14 @@ const sharedKnipConfig = {
|
|
|
38
38
|
'@kitschpatrol/prettier-config',
|
|
39
39
|
'@kitschpatrol/remark-config',
|
|
40
40
|
'@kitschpatrol/stylelint-config',
|
|
41
|
+
'@prettier/plugin-php',
|
|
42
|
+
'@prettier/plugin-ruby',
|
|
43
|
+
'@prettier/plugin-xml',
|
|
44
|
+
'prettier-plugin-packagejson',
|
|
45
|
+
'prettier-plugin-sh',
|
|
46
|
+
'prettier-plugin-sql',
|
|
47
|
+
'prettier-plugin-tailwindcss',
|
|
48
|
+
'prettier-plugin-toml',
|
|
41
49
|
],
|
|
42
50
|
};
|
|
43
51
|
/**
|
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.
|