@coderwyd/eslint-config 4.7.2 → 4.9.1
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/README.md +1 -1
- package/dist/{cli.js → cli.mjs} +31 -34
- package/dist/{index.d.ts → index.d.mts} +1554 -654
- package/dist/{index.js → index.mjs} +134 -12
- package/package.json +42 -43
- /package/dist/{cli.d.ts → cli.d.mts} +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/coderwyd/eslint-config/actions/workflows/release.yml)
|
|
4
4
|
[](https://npmjs.org/package/@coderwyd/eslint-config)
|
|
5
|
-
[](https://npmjs.org/package/@coderwyd/eslint-config)
|
|
6
6
|
|
|
7
7
|
## Feature
|
|
8
8
|
|
package/dist/{cli.js → cli.mjs}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import process from "node:process";
|
|
2
2
|
import { styleText } from "node:util";
|
|
3
|
-
import
|
|
4
|
-
import { hideBin } from "yargs/helpers";
|
|
3
|
+
import { cac } from "cac";
|
|
5
4
|
import fs from "node:fs";
|
|
6
5
|
import fsp from "node:fs/promises";
|
|
7
6
|
import path from "node:path";
|
|
@@ -10,33 +9,31 @@ import prompts from "prompts";
|
|
|
10
9
|
import { execSync } from "node:child_process";
|
|
11
10
|
|
|
12
11
|
//#region package.json
|
|
13
|
-
var version = "4.
|
|
12
|
+
var version = "4.9.1";
|
|
14
13
|
var devDependencies = {
|
|
15
|
-
"@
|
|
16
|
-
"@eslint
|
|
17
|
-
"@eslint
|
|
18
|
-
"@types/
|
|
19
|
-
"@types/
|
|
20
|
-
"@
|
|
21
|
-
"@
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"eslint": "
|
|
25
|
-
"eslint-plugin-react-
|
|
26
|
-
"eslint-plugin-
|
|
27
|
-
"eslint-plugin-
|
|
28
|
-
"eslint-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"typescript": "^5.9.3",
|
|
39
|
-
"unplugin-unused": "^0.5.4"
|
|
14
|
+
"@eslint-react/eslint-plugin": "catalog:peer",
|
|
15
|
+
"@eslint/config-inspector": "catalog:dev",
|
|
16
|
+
"@types/eslint-config-prettier": "catalog:dev",
|
|
17
|
+
"@types/node": "catalog:dev",
|
|
18
|
+
"@types/prompts": "catalog:dev",
|
|
19
|
+
"@typescript/native-preview": "catalog:dev",
|
|
20
|
+
"@unocss/eslint-plugin": "catalog:peer",
|
|
21
|
+
"bumpp": "catalog:dev",
|
|
22
|
+
"eslint": "catalog:peer",
|
|
23
|
+
"eslint-plugin-react-hooks": "catalog:peer",
|
|
24
|
+
"eslint-plugin-react-refresh": "catalog:peer",
|
|
25
|
+
"eslint-plugin-svelte": "catalog:peer",
|
|
26
|
+
"eslint-plugin-tailwindcss": "catalog:peer",
|
|
27
|
+
"eslint-typegen": "catalog:dev",
|
|
28
|
+
"jiti": "catalog:dev",
|
|
29
|
+
"nano-staged": "catalog:dev",
|
|
30
|
+
"prettier": "catalog:dev",
|
|
31
|
+
"publint": "catalog:dev",
|
|
32
|
+
"simple-git-hooks": "catalog:dev",
|
|
33
|
+
"svelte-eslint-parser": "catalog:peer",
|
|
34
|
+
"tsdown": "catalog:dev",
|
|
35
|
+
"typescript": "catalog:dev",
|
|
36
|
+
"unplugin-unused": "catalog:dev"
|
|
40
37
|
};
|
|
41
38
|
|
|
42
39
|
//#endregion
|
|
@@ -166,11 +163,8 @@ module.exports = defineConfig({\n${coderwydConfig}\n})
|
|
|
166
163
|
function header() {
|
|
167
164
|
console.log(`\n${styleText("green", `@coderwyd/eslint-config `)}${styleText("dim", `v${version}`)}`);
|
|
168
165
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
description: "Skip prompts and use default values",
|
|
172
|
-
type: "boolean"
|
|
173
|
-
}).help(), async (args) => {
|
|
166
|
+
const cli = cac("@coderwyd/eslint-config");
|
|
167
|
+
cli.command("", "Run the initialization or migration").option("--yes, -y", "Skip prompts and use default values", { default: false }).action(async (args) => {
|
|
174
168
|
header();
|
|
175
169
|
console.log();
|
|
176
170
|
try {
|
|
@@ -180,7 +174,10 @@ yargs(hideBin(process.argv)).scriptName("@coderwyd/eslint-config").usage("").com
|
|
|
180
174
|
console.error(styleText("red", `${CROSS} ${String(error)}`));
|
|
181
175
|
process.exit(1);
|
|
182
176
|
}
|
|
183
|
-
})
|
|
177
|
+
});
|
|
178
|
+
cli.help();
|
|
179
|
+
cli.version(version);
|
|
180
|
+
cli.parse();
|
|
184
181
|
|
|
185
182
|
//#endregion
|
|
186
183
|
export { };
|