@coderwyd/eslint-config 4.4.0 → 4.5.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/dist/cli.js +12 -13
- package/dist/index.d.ts +184 -141
- package/dist/index.js +9 -6
- package/package.json +26 -26
- package/dist/dist-DYrxmIwK.js +0 -1887
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ const GLOB_DTS = "**/*.d.?([cm])ts";
|
|
|
58
58
|
const GLOB_TSX = "**/*.?([cm])tsx";
|
|
59
59
|
const GLOB_VUE = "**/*.vue";
|
|
60
60
|
const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
61
|
-
const GLOB_SVELTE = "**/*.svelte";
|
|
61
|
+
const GLOB_SVELTE = "**/*.svelte?(.{js,ts})";
|
|
62
62
|
const GLOB_JSON = "**/*.json";
|
|
63
63
|
const GLOB_JSON5 = "**/*.json5";
|
|
64
64
|
const GLOB_JSONC = "**/*.jsonc";
|
|
@@ -221,7 +221,7 @@ function isInGitHooksOrLintStaged() {
|
|
|
221
221
|
//#endregion
|
|
222
222
|
//#region src/configs/imports.ts
|
|
223
223
|
async function imports() {
|
|
224
|
-
const pluginImport = await interopDefault(import("
|
|
224
|
+
const pluginImport = await interopDefault(import("eslint-plugin-import-lite"));
|
|
225
225
|
return [{
|
|
226
226
|
name: "coderwyd/imports/rules",
|
|
227
227
|
plugins: {
|
|
@@ -785,7 +785,11 @@ async function react(options = {}) {
|
|
|
785
785
|
"links",
|
|
786
786
|
"headers",
|
|
787
787
|
"loader",
|
|
788
|
-
"action"
|
|
788
|
+
"action",
|
|
789
|
+
"clientLoader",
|
|
790
|
+
"clientAction",
|
|
791
|
+
"handle",
|
|
792
|
+
"shouldRevalidate"
|
|
789
793
|
] : []]
|
|
790
794
|
}],
|
|
791
795
|
...overrides
|
|
@@ -929,7 +933,7 @@ function sortPackageJson() {
|
|
|
929
933
|
*/
|
|
930
934
|
function sortTsconfig() {
|
|
931
935
|
return [{
|
|
932
|
-
files: ["**/
|
|
936
|
+
files: ["**/[jt]sconfig.json", "**/[jt]sconfig.*.json"],
|
|
933
937
|
name: "coderwyd/sort/tsconfig-json",
|
|
934
938
|
rules: { "jsonc/sort-keys": [
|
|
935
939
|
"error",
|
|
@@ -1135,7 +1139,6 @@ async function svelte(options = {}) {
|
|
|
1135
1139
|
"svelte/no-dupe-else-if-blocks": "error",
|
|
1136
1140
|
"svelte/no-dupe-style-properties": "error",
|
|
1137
1141
|
"svelte/no-dupe-use-directives": "error",
|
|
1138
|
-
"svelte/no-dynamic-slot-name": "error",
|
|
1139
1142
|
"svelte/no-export-load-in-svelte-module-in-kit-pages": "error",
|
|
1140
1143
|
"svelte/no-inner-declarations": "error",
|
|
1141
1144
|
"svelte/no-not-function-handler": "error",
|
|
@@ -1424,7 +1427,7 @@ function unicorn(options = {}) {
|
|
|
1424
1427
|
async function unocss(options = {}) {
|
|
1425
1428
|
const { attributify = true, strict = false } = options;
|
|
1426
1429
|
await ensurePackages(["@unocss/eslint-plugin"]);
|
|
1427
|
-
const
|
|
1430
|
+
const pluginUnoCSS = await interopDefault(import("@unocss/eslint-plugin"));
|
|
1428
1431
|
return [{
|
|
1429
1432
|
name: "coderwyd/unocss/rules",
|
|
1430
1433
|
plugins: { unocss: pluginUnoCSS },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coderwyd/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.5.0",
|
|
5
5
|
"description": "Donny's ESLint config",
|
|
6
6
|
"author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -71,59 +71,59 @@
|
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@antfu/install-pkg": "^1.1.0",
|
|
73
73
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
74
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
75
|
-
"@typescript-eslint/parser": "^8.
|
|
76
|
-
"@vitest/eslint-plugin": "^1.
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
75
|
+
"@typescript-eslint/parser": "^8.38.0",
|
|
76
|
+
"@vitest/eslint-plugin": "^1.3.4",
|
|
77
77
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
78
|
-
"eslint-config-prettier": "^10.1.
|
|
78
|
+
"eslint-config-prettier": "^10.1.8",
|
|
79
79
|
"eslint-plugin-antfu": "^3.1.1",
|
|
80
|
-
"eslint-plugin-command": "^3.
|
|
80
|
+
"eslint-plugin-command": "^3.3.1",
|
|
81
81
|
"eslint-plugin-de-morgan": "^1.3.0",
|
|
82
82
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
83
|
-
"eslint-plugin-
|
|
83
|
+
"eslint-plugin-import-lite": "^0.3.0",
|
|
84
|
+
"eslint-plugin-jsdoc": "^51.4.1",
|
|
84
85
|
"eslint-plugin-jsonc": "^2.20.1",
|
|
85
|
-
"eslint-plugin-n": "^17.
|
|
86
|
+
"eslint-plugin-n": "^17.21.0",
|
|
86
87
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
87
88
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
88
89
|
"eslint-plugin-regexp": "^2.9.0",
|
|
89
|
-
"eslint-plugin-unicorn": "^
|
|
90
|
+
"eslint-plugin-unicorn": "^60.0.0",
|
|
90
91
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
91
|
-
"eslint-plugin-vue": "^10.
|
|
92
|
+
"eslint-plugin-vue": "^10.3.0",
|
|
92
93
|
"eslint-plugin-yml": "^1.18.0",
|
|
93
|
-
"eslint-typegen": "^2.2.
|
|
94
|
-
"globals": "^16.
|
|
94
|
+
"eslint-typegen": "^2.2.1",
|
|
95
|
+
"globals": "^16.3.0",
|
|
95
96
|
"jsonc-eslint-parser": "^2.4.0",
|
|
96
97
|
"local-pkg": "^1.1.1",
|
|
97
98
|
"parse-gitignore": "^2.0.0",
|
|
98
99
|
"picocolors": "^1.1.1",
|
|
99
|
-
"prettier": "^3.
|
|
100
|
+
"prettier": "^3.6.2",
|
|
100
101
|
"prompts": "^2.4.2",
|
|
101
|
-
"vue-eslint-parser": "^10.
|
|
102
|
+
"vue-eslint-parser": "^10.2.0",
|
|
102
103
|
"yaml-eslint-parser": "^1.3.0",
|
|
103
104
|
"yargs": "^18.0.0"
|
|
104
105
|
},
|
|
105
106
|
"devDependencies": {
|
|
106
107
|
"@antfu/ni": "^25.0.0",
|
|
107
|
-
"@eslint-react/eslint-plugin": "^1.52.
|
|
108
|
+
"@eslint-react/eslint-plugin": "^1.52.3",
|
|
108
109
|
"@eslint/config-inspector": "^1.1.0",
|
|
109
110
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
110
|
-
"@types/node": "^24.0
|
|
111
|
+
"@types/node": "^24.1.0",
|
|
111
112
|
"@types/prompts": "^2.4.9",
|
|
112
113
|
"@types/yargs": "^17.0.33",
|
|
113
|
-
"@unocss/eslint-plugin": "^66.
|
|
114
|
+
"@unocss/eslint-plugin": "^66.3.3",
|
|
114
115
|
"bumpp": "^10.2.0",
|
|
115
|
-
"eslint": "^9.
|
|
116
|
-
"eslint-plugin-
|
|
117
|
-
"eslint-plugin-react-hooks": "6.0.0-rc.1",
|
|
116
|
+
"eslint": "^9.31.0",
|
|
117
|
+
"eslint-plugin-react-hooks": "6.0.0-rc1",
|
|
118
118
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
119
|
-
"eslint-plugin-svelte": "^3.
|
|
120
|
-
"eslint-plugin-tailwindcss": "^3.18.
|
|
121
|
-
"jiti": "^2.
|
|
119
|
+
"eslint-plugin-svelte": "^3.11.0",
|
|
120
|
+
"eslint-plugin-tailwindcss": "^3.18.2",
|
|
121
|
+
"jiti": "^2.5.0",
|
|
122
122
|
"nano-staged": "^0.8.0",
|
|
123
123
|
"simple-git-hooks": "^2.13.0",
|
|
124
|
-
"svelte": "^5.
|
|
125
|
-
"svelte-eslint-parser": "^1.
|
|
126
|
-
"tsdown": "^0.
|
|
124
|
+
"svelte": "^5.36.14",
|
|
125
|
+
"svelte-eslint-parser": "^1.3.0",
|
|
126
|
+
"tsdown": "^0.13.0",
|
|
127
127
|
"typescript": "^5.8.3"
|
|
128
128
|
},
|
|
129
129
|
"simple-git-hooks": {
|