@dhzh/eslint-config 0.17.0 → 0.18.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.cjs +13 -13
- package/dist/cli.js +13 -13
- package/dist/index.cjs +7 -1
- package/dist/index.d.cts +34 -10
- package/dist/index.d.ts +34 -10
- package/dist/index.js +7 -1
- package/package.json +13 -13
package/dist/cli.cjs
CHANGED
|
@@ -41,7 +41,7 @@ var import_picocolors = __toESM(require("picocolors"), 1);
|
|
|
41
41
|
var package_default = {
|
|
42
42
|
name: "@dhzh/eslint-config",
|
|
43
43
|
type: "module",
|
|
44
|
-
version: "0.
|
|
44
|
+
version: "0.18.0",
|
|
45
45
|
packageManager: "pnpm@9.15.3",
|
|
46
46
|
description: "Lyle's ESLint config",
|
|
47
47
|
author: "Lyle Zheng <dhzhme@gmail.com>",
|
|
@@ -70,8 +70,8 @@ var package_default = {
|
|
|
70
70
|
dev: "npx @eslint/config-inspector --config eslint.config.ts",
|
|
71
71
|
"build:inspector": "pnpm build && npx @eslint/config-inspector build",
|
|
72
72
|
watch: "tsup --format esm,cjs --watch",
|
|
73
|
-
lint: "eslint
|
|
74
|
-
"lint-fix": "eslint --fix
|
|
73
|
+
lint: "eslint .",
|
|
74
|
+
"lint-fix": "eslint --fix .",
|
|
75
75
|
typegen: "tsx scripts/typegen.ts",
|
|
76
76
|
prepack: "nr build",
|
|
77
77
|
release: "bumpp && pnpm publish --access=public",
|
|
@@ -129,15 +129,15 @@ var package_default = {
|
|
|
129
129
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
130
130
|
"@eslint-react/eslint-plugin": "^1.23.2",
|
|
131
131
|
"@eslint/markdown": "^6.2.1",
|
|
132
|
-
"@stylistic/eslint-plugin": "^2.
|
|
132
|
+
"@stylistic/eslint-plugin": "^2.13.0",
|
|
133
133
|
"@typescript-eslint/eslint-plugin": "^8.19.1",
|
|
134
134
|
"@typescript-eslint/parser": "^8.19.1",
|
|
135
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
135
|
+
"@vitest/eslint-plugin": "^1.1.25",
|
|
136
136
|
"eslint-config-flat-gitignore": "^1.0.0",
|
|
137
137
|
"eslint-flat-config-utils": "^1.0.0",
|
|
138
138
|
"eslint-merge-processors": "^1.0.0",
|
|
139
139
|
"eslint-plugin-antfu": "^2.7.0",
|
|
140
|
-
"eslint-plugin-command": "^2.0
|
|
140
|
+
"eslint-plugin-command": "^2.1.0",
|
|
141
141
|
"eslint-plugin-import-x": "^4.6.1",
|
|
142
142
|
"eslint-plugin-jsdoc": "^50.6.1",
|
|
143
143
|
"eslint-plugin-jsonc": "^2.18.2",
|
|
@@ -145,7 +145,7 @@ var package_default = {
|
|
|
145
145
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
146
146
|
"eslint-plugin-perfectionist": "^4.6.0",
|
|
147
147
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
148
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
148
|
+
"eslint-plugin-react-refresh": "^0.4.18",
|
|
149
149
|
"eslint-plugin-regexp": "^2.7.0",
|
|
150
150
|
"eslint-plugin-toml": "^0.12.0",
|
|
151
151
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
@@ -167,21 +167,21 @@ var package_default = {
|
|
|
167
167
|
"@antfu/ni": "^23.2.0",
|
|
168
168
|
"@eslint/config-inspector": "^0.7.1",
|
|
169
169
|
"@prettier/plugin-xml": "^3.4.1",
|
|
170
|
-
"@stylistic/eslint-plugin-migrate": "^2.
|
|
170
|
+
"@stylistic/eslint-plugin-migrate": "^2.13.0",
|
|
171
171
|
"@types/fs-extra": "^11.0.4",
|
|
172
172
|
"@types/node": "^22.10.5",
|
|
173
173
|
"@types/prompts": "^2.4.9",
|
|
174
174
|
"@types/yargs": "^17.0.33",
|
|
175
|
-
"@unocss/eslint-plugin": "^
|
|
175
|
+
"@unocss/eslint-plugin": "^65.4.0",
|
|
176
176
|
"astro-eslint-parser": "^1.1.0",
|
|
177
177
|
bumpp: "^9.10.0",
|
|
178
178
|
"bundle-require": "^5.0.0",
|
|
179
|
-
eslint: "^9.
|
|
179
|
+
eslint: "^9.18.0",
|
|
180
180
|
"eslint-plugin-astro": "^1.3.1",
|
|
181
181
|
"eslint-plugin-format": "^1.0.1",
|
|
182
182
|
"eslint-plugin-solid": "^0.14.5",
|
|
183
183
|
"eslint-plugin-svelte": "^2.46.1",
|
|
184
|
-
"eslint-typegen": "^0.
|
|
184
|
+
"eslint-typegen": "^1.0.0",
|
|
185
185
|
execa: "^9.5.2",
|
|
186
186
|
"fast-glob": "^3.3.3",
|
|
187
187
|
"fs-extra": "^11.2.0",
|
|
@@ -199,14 +199,14 @@ var package_default = {
|
|
|
199
199
|
resolutions: {
|
|
200
200
|
"@eslint-community/eslint-utils": "^4.4.1",
|
|
201
201
|
"@typescript-eslint/utils": "^8.19.1",
|
|
202
|
-
eslint: "^9.
|
|
202
|
+
eslint: "^9.18.0",
|
|
203
203
|
tsx: "^4.19.2"
|
|
204
204
|
},
|
|
205
205
|
"simple-git-hooks": {
|
|
206
206
|
"pre-commit": "npx lint-staged"
|
|
207
207
|
},
|
|
208
208
|
"lint-staged": {
|
|
209
|
-
"*": "eslint --
|
|
209
|
+
"*": "eslint --fix"
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
212
|
|
package/dist/cli.js
CHANGED
|
@@ -12,7 +12,7 @@ import c from "picocolors";
|
|
|
12
12
|
var package_default = {
|
|
13
13
|
name: "@dhzh/eslint-config",
|
|
14
14
|
type: "module",
|
|
15
|
-
version: "0.
|
|
15
|
+
version: "0.18.0",
|
|
16
16
|
packageManager: "pnpm@9.15.3",
|
|
17
17
|
description: "Lyle's ESLint config",
|
|
18
18
|
author: "Lyle Zheng <dhzhme@gmail.com>",
|
|
@@ -41,8 +41,8 @@ var package_default = {
|
|
|
41
41
|
dev: "npx @eslint/config-inspector --config eslint.config.ts",
|
|
42
42
|
"build:inspector": "pnpm build && npx @eslint/config-inspector build",
|
|
43
43
|
watch: "tsup --format esm,cjs --watch",
|
|
44
|
-
lint: "eslint
|
|
45
|
-
"lint-fix": "eslint --fix
|
|
44
|
+
lint: "eslint .",
|
|
45
|
+
"lint-fix": "eslint --fix .",
|
|
46
46
|
typegen: "tsx scripts/typegen.ts",
|
|
47
47
|
prepack: "nr build",
|
|
48
48
|
release: "bumpp && pnpm publish --access=public",
|
|
@@ -100,15 +100,15 @@ var package_default = {
|
|
|
100
100
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
101
101
|
"@eslint-react/eslint-plugin": "^1.23.2",
|
|
102
102
|
"@eslint/markdown": "^6.2.1",
|
|
103
|
-
"@stylistic/eslint-plugin": "^2.
|
|
103
|
+
"@stylistic/eslint-plugin": "^2.13.0",
|
|
104
104
|
"@typescript-eslint/eslint-plugin": "^8.19.1",
|
|
105
105
|
"@typescript-eslint/parser": "^8.19.1",
|
|
106
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
106
|
+
"@vitest/eslint-plugin": "^1.1.25",
|
|
107
107
|
"eslint-config-flat-gitignore": "^1.0.0",
|
|
108
108
|
"eslint-flat-config-utils": "^1.0.0",
|
|
109
109
|
"eslint-merge-processors": "^1.0.0",
|
|
110
110
|
"eslint-plugin-antfu": "^2.7.0",
|
|
111
|
-
"eslint-plugin-command": "^2.0
|
|
111
|
+
"eslint-plugin-command": "^2.1.0",
|
|
112
112
|
"eslint-plugin-import-x": "^4.6.1",
|
|
113
113
|
"eslint-plugin-jsdoc": "^50.6.1",
|
|
114
114
|
"eslint-plugin-jsonc": "^2.18.2",
|
|
@@ -116,7 +116,7 @@ var package_default = {
|
|
|
116
116
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
117
117
|
"eslint-plugin-perfectionist": "^4.6.0",
|
|
118
118
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
119
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
119
|
+
"eslint-plugin-react-refresh": "^0.4.18",
|
|
120
120
|
"eslint-plugin-regexp": "^2.7.0",
|
|
121
121
|
"eslint-plugin-toml": "^0.12.0",
|
|
122
122
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
@@ -138,21 +138,21 @@ var package_default = {
|
|
|
138
138
|
"@antfu/ni": "^23.2.0",
|
|
139
139
|
"@eslint/config-inspector": "^0.7.1",
|
|
140
140
|
"@prettier/plugin-xml": "^3.4.1",
|
|
141
|
-
"@stylistic/eslint-plugin-migrate": "^2.
|
|
141
|
+
"@stylistic/eslint-plugin-migrate": "^2.13.0",
|
|
142
142
|
"@types/fs-extra": "^11.0.4",
|
|
143
143
|
"@types/node": "^22.10.5",
|
|
144
144
|
"@types/prompts": "^2.4.9",
|
|
145
145
|
"@types/yargs": "^17.0.33",
|
|
146
|
-
"@unocss/eslint-plugin": "^
|
|
146
|
+
"@unocss/eslint-plugin": "^65.4.0",
|
|
147
147
|
"astro-eslint-parser": "^1.1.0",
|
|
148
148
|
bumpp: "^9.10.0",
|
|
149
149
|
"bundle-require": "^5.0.0",
|
|
150
|
-
eslint: "^9.
|
|
150
|
+
eslint: "^9.18.0",
|
|
151
151
|
"eslint-plugin-astro": "^1.3.1",
|
|
152
152
|
"eslint-plugin-format": "^1.0.1",
|
|
153
153
|
"eslint-plugin-solid": "^0.14.5",
|
|
154
154
|
"eslint-plugin-svelte": "^2.46.1",
|
|
155
|
-
"eslint-typegen": "^0.
|
|
155
|
+
"eslint-typegen": "^1.0.0",
|
|
156
156
|
execa: "^9.5.2",
|
|
157
157
|
"fast-glob": "^3.3.3",
|
|
158
158
|
"fs-extra": "^11.2.0",
|
|
@@ -170,14 +170,14 @@ var package_default = {
|
|
|
170
170
|
resolutions: {
|
|
171
171
|
"@eslint-community/eslint-utils": "^4.4.1",
|
|
172
172
|
"@typescript-eslint/utils": "^8.19.1",
|
|
173
|
-
eslint: "^9.
|
|
173
|
+
eslint: "^9.18.0",
|
|
174
174
|
tsx: "^4.19.2"
|
|
175
175
|
},
|
|
176
176
|
"simple-git-hooks": {
|
|
177
177
|
"pre-commit": "npx lint-staged"
|
|
178
178
|
},
|
|
179
179
|
"lint-staged": {
|
|
180
|
-
"*": "eslint --
|
|
180
|
+
"*": "eslint --fix"
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
183
|
|
package/dist/index.cjs
CHANGED
|
@@ -1382,7 +1382,8 @@ async function react(options = {}) {
|
|
|
1382
1382
|
"react-hooks": pluginReactHooks,
|
|
1383
1383
|
"react-hooks-extra": plugins["@eslint-react/hooks-extra"],
|
|
1384
1384
|
"react-naming-convention": plugins["@eslint-react/naming-convention"],
|
|
1385
|
-
"react-refresh": pluginReactRefresh
|
|
1385
|
+
"react-refresh": pluginReactRefresh,
|
|
1386
|
+
"react-web-api": plugins["@eslint-react/web-api"]
|
|
1386
1387
|
}
|
|
1387
1388
|
},
|
|
1388
1389
|
{
|
|
@@ -1443,6 +1444,11 @@ async function react(options = {}) {
|
|
|
1443
1444
|
]
|
|
1444
1445
|
}
|
|
1445
1446
|
],
|
|
1447
|
+
// recommended rules from @eslint-react/web-api
|
|
1448
|
+
"react-web-api/no-leaked-event-listener": "warn",
|
|
1449
|
+
"react-web-api/no-leaked-interval": "warn",
|
|
1450
|
+
"react-web-api/no-leaked-resize-observer": "warn",
|
|
1451
|
+
"react-web-api/no-leaked-timeout": "warn",
|
|
1446
1452
|
// recommended rules from @eslint-react
|
|
1447
1453
|
"react/ensure-forward-ref-using-ref": "warn",
|
|
1448
1454
|
"react/jsx-no-duplicate-props": "warn",
|
package/dist/index.d.cts
CHANGED
|
@@ -468,7 +468,7 @@ interface RuleOptions {
|
|
|
468
468
|
*/
|
|
469
469
|
'default-case'?: Linter.RuleEntry<DefaultCase>
|
|
470
470
|
/**
|
|
471
|
-
* Enforce `default` clauses in switch statements to be last
|
|
471
|
+
* Enforce `default` clauses in `switch` statements to be last
|
|
472
472
|
* @see https://eslint.org/docs/latest/rules/default-case-last
|
|
473
473
|
*/
|
|
474
474
|
'default-case-last'?: Linter.RuleEntry<[]>
|
|
@@ -2972,6 +2972,26 @@ interface RuleOptions {
|
|
|
2972
2972
|
*/
|
|
2973
2973
|
'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
|
|
2974
2974
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
|
|
2975
|
+
/**
|
|
2976
|
+
* enforce that every 'addEventListener' in a component or custom Hook has a corresponding 'removeEventListener'.
|
|
2977
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
|
|
2978
|
+
*/
|
|
2979
|
+
'react-web-api/no-leaked-event-listener'?: Linter.RuleEntry<[]>
|
|
2980
|
+
/**
|
|
2981
|
+
* enforce that every 'setInterval' in a component or custom Hook has a corresponding 'clearInterval'.
|
|
2982
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
|
|
2983
|
+
*/
|
|
2984
|
+
'react-web-api/no-leaked-interval'?: Linter.RuleEntry<[]>
|
|
2985
|
+
/**
|
|
2986
|
+
* enforce cleanup of 'ResizeObserver' instances in components and custom Hooks.
|
|
2987
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
|
|
2988
|
+
*/
|
|
2989
|
+
'react-web-api/no-leaked-resize-observer'?: Linter.RuleEntry<[]>
|
|
2990
|
+
/**
|
|
2991
|
+
* enforce that every 'setTimeout' in a component or custom Hook has a corresponding 'clearTimeout'.
|
|
2992
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
2993
|
+
*/
|
|
2994
|
+
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>
|
|
2975
2995
|
/**
|
|
2976
2996
|
* disallow using shorthand boolean attributes
|
|
2977
2997
|
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-boolean
|
|
@@ -3793,7 +3813,7 @@ interface RuleOptions {
|
|
|
3793
3813
|
*/
|
|
3794
3814
|
'solid/style-prop'?: Linter.RuleEntry<SolidStyleProp>
|
|
3795
3815
|
/**
|
|
3796
|
-
* Enforce sorted import declarations within modules
|
|
3816
|
+
* Enforce sorted `import` declarations within modules
|
|
3797
3817
|
* @see https://eslint.org/docs/latest/rules/sort-imports
|
|
3798
3818
|
*/
|
|
3799
3819
|
'sort-imports'?: Linter.RuleEntry<SortImports>
|
|
@@ -12120,6 +12140,7 @@ type StyleKeySpacing = []|[({
|
|
|
12120
12140
|
mode?: ("strict" | "minimum")
|
|
12121
12141
|
beforeColon?: boolean
|
|
12122
12142
|
afterColon?: boolean
|
|
12143
|
+
ignoredNodes?: ("ObjectExpression" | "ObjectPattern" | "ImportDeclaration" | "ExportNamedDeclaration" | "ExportAllDeclaration" | "TSTypeLiteral" | "TSInterfaceBody" | "ClassBody")[]
|
|
12123
12144
|
} | {
|
|
12124
12145
|
singleLine?: {
|
|
12125
12146
|
mode?: ("strict" | "minimum")
|
|
@@ -12635,6 +12656,7 @@ type StyleNoExtraParens = ([]|["functions"] | []|["all"]|["all", {
|
|
|
12635
12656
|
enforceForNewInMemberExpressions?: boolean
|
|
12636
12657
|
enforceForFunctionPrototypeMethods?: boolean
|
|
12637
12658
|
allowParensAfterCommentPattern?: string
|
|
12659
|
+
nestedConditionalExpressions?: boolean
|
|
12638
12660
|
}])
|
|
12639
12661
|
// ----- style/no-mixed-operators -----
|
|
12640
12662
|
type StyleNoMixedOperators = []|[{
|
|
@@ -12732,14 +12754,14 @@ type StyleOperatorLinebreak = []|[(("after" | "before" | "none") | null)]|[(("af
|
|
|
12732
12754
|
}
|
|
12733
12755
|
}]
|
|
12734
12756
|
// ----- style/padded-blocks -----
|
|
12735
|
-
type StylePaddedBlocks = []|[(("always" | "never") | {
|
|
12736
|
-
blocks?: ("always" | "never")
|
|
12737
|
-
switches?: ("always" | "never")
|
|
12738
|
-
classes?: ("always" | "never")
|
|
12739
|
-
})]|[(("always" | "never") | {
|
|
12740
|
-
blocks?: ("always" | "never")
|
|
12741
|
-
switches?: ("always" | "never")
|
|
12742
|
-
classes?: ("always" | "never")
|
|
12757
|
+
type StylePaddedBlocks = []|[(("always" | "never" | "start" | "end") | {
|
|
12758
|
+
blocks?: ("always" | "never" | "start" | "end")
|
|
12759
|
+
switches?: ("always" | "never" | "start" | "end")
|
|
12760
|
+
classes?: ("always" | "never" | "start" | "end")
|
|
12761
|
+
})]|[(("always" | "never" | "start" | "end") | {
|
|
12762
|
+
blocks?: ("always" | "never" | "start" | "end")
|
|
12763
|
+
switches?: ("always" | "never" | "start" | "end")
|
|
12764
|
+
classes?: ("always" | "never" | "start" | "end")
|
|
12743
12765
|
}), {
|
|
12744
12766
|
allowSingleLineBlocks?: boolean
|
|
12745
12767
|
}]
|
|
@@ -14882,6 +14904,7 @@ type VueKeySpacing = []|[({
|
|
|
14882
14904
|
mode?: ("strict" | "minimum")
|
|
14883
14905
|
beforeColon?: boolean
|
|
14884
14906
|
afterColon?: boolean
|
|
14907
|
+
ignoredNodes?: ("ObjectExpression" | "ObjectPattern" | "ImportDeclaration" | "ExportNamedDeclaration" | "ExportAllDeclaration" | "TSTypeLiteral" | "TSInterfaceBody" | "ClassBody")[]
|
|
14885
14908
|
} | {
|
|
14886
14909
|
singleLine?: {
|
|
14887
14910
|
mode?: ("strict" | "minimum")
|
|
@@ -15408,6 +15431,7 @@ type VueNoExtraParens = ([]|["functions"] | []|["all"]|["all", {
|
|
|
15408
15431
|
enforceForNewInMemberExpressions?: boolean
|
|
15409
15432
|
enforceForFunctionPrototypeMethods?: boolean
|
|
15410
15433
|
allowParensAfterCommentPattern?: string
|
|
15434
|
+
nestedConditionalExpressions?: boolean
|
|
15411
15435
|
}])
|
|
15412
15436
|
// ----- vue/no-irregular-whitespace -----
|
|
15413
15437
|
type VueNoIrregularWhitespace = []|[{
|
package/dist/index.d.ts
CHANGED
|
@@ -468,7 +468,7 @@ interface RuleOptions {
|
|
|
468
468
|
*/
|
|
469
469
|
'default-case'?: Linter.RuleEntry<DefaultCase>
|
|
470
470
|
/**
|
|
471
|
-
* Enforce `default` clauses in switch statements to be last
|
|
471
|
+
* Enforce `default` clauses in `switch` statements to be last
|
|
472
472
|
* @see https://eslint.org/docs/latest/rules/default-case-last
|
|
473
473
|
*/
|
|
474
474
|
'default-case-last'?: Linter.RuleEntry<[]>
|
|
@@ -2972,6 +2972,26 @@ interface RuleOptions {
|
|
|
2972
2972
|
*/
|
|
2973
2973
|
'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
|
|
2974
2974
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
|
|
2975
|
+
/**
|
|
2976
|
+
* enforce that every 'addEventListener' in a component or custom Hook has a corresponding 'removeEventListener'.
|
|
2977
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
|
|
2978
|
+
*/
|
|
2979
|
+
'react-web-api/no-leaked-event-listener'?: Linter.RuleEntry<[]>
|
|
2980
|
+
/**
|
|
2981
|
+
* enforce that every 'setInterval' in a component or custom Hook has a corresponding 'clearInterval'.
|
|
2982
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
|
|
2983
|
+
*/
|
|
2984
|
+
'react-web-api/no-leaked-interval'?: Linter.RuleEntry<[]>
|
|
2985
|
+
/**
|
|
2986
|
+
* enforce cleanup of 'ResizeObserver' instances in components and custom Hooks.
|
|
2987
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
|
|
2988
|
+
*/
|
|
2989
|
+
'react-web-api/no-leaked-resize-observer'?: Linter.RuleEntry<[]>
|
|
2990
|
+
/**
|
|
2991
|
+
* enforce that every 'setTimeout' in a component or custom Hook has a corresponding 'clearTimeout'.
|
|
2992
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
2993
|
+
*/
|
|
2994
|
+
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>
|
|
2975
2995
|
/**
|
|
2976
2996
|
* disallow using shorthand boolean attributes
|
|
2977
2997
|
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-boolean
|
|
@@ -3793,7 +3813,7 @@ interface RuleOptions {
|
|
|
3793
3813
|
*/
|
|
3794
3814
|
'solid/style-prop'?: Linter.RuleEntry<SolidStyleProp>
|
|
3795
3815
|
/**
|
|
3796
|
-
* Enforce sorted import declarations within modules
|
|
3816
|
+
* Enforce sorted `import` declarations within modules
|
|
3797
3817
|
* @see https://eslint.org/docs/latest/rules/sort-imports
|
|
3798
3818
|
*/
|
|
3799
3819
|
'sort-imports'?: Linter.RuleEntry<SortImports>
|
|
@@ -12120,6 +12140,7 @@ type StyleKeySpacing = []|[({
|
|
|
12120
12140
|
mode?: ("strict" | "minimum")
|
|
12121
12141
|
beforeColon?: boolean
|
|
12122
12142
|
afterColon?: boolean
|
|
12143
|
+
ignoredNodes?: ("ObjectExpression" | "ObjectPattern" | "ImportDeclaration" | "ExportNamedDeclaration" | "ExportAllDeclaration" | "TSTypeLiteral" | "TSInterfaceBody" | "ClassBody")[]
|
|
12123
12144
|
} | {
|
|
12124
12145
|
singleLine?: {
|
|
12125
12146
|
mode?: ("strict" | "minimum")
|
|
@@ -12635,6 +12656,7 @@ type StyleNoExtraParens = ([]|["functions"] | []|["all"]|["all", {
|
|
|
12635
12656
|
enforceForNewInMemberExpressions?: boolean
|
|
12636
12657
|
enforceForFunctionPrototypeMethods?: boolean
|
|
12637
12658
|
allowParensAfterCommentPattern?: string
|
|
12659
|
+
nestedConditionalExpressions?: boolean
|
|
12638
12660
|
}])
|
|
12639
12661
|
// ----- style/no-mixed-operators -----
|
|
12640
12662
|
type StyleNoMixedOperators = []|[{
|
|
@@ -12732,14 +12754,14 @@ type StyleOperatorLinebreak = []|[(("after" | "before" | "none") | null)]|[(("af
|
|
|
12732
12754
|
}
|
|
12733
12755
|
}]
|
|
12734
12756
|
// ----- style/padded-blocks -----
|
|
12735
|
-
type StylePaddedBlocks = []|[(("always" | "never") | {
|
|
12736
|
-
blocks?: ("always" | "never")
|
|
12737
|
-
switches?: ("always" | "never")
|
|
12738
|
-
classes?: ("always" | "never")
|
|
12739
|
-
})]|[(("always" | "never") | {
|
|
12740
|
-
blocks?: ("always" | "never")
|
|
12741
|
-
switches?: ("always" | "never")
|
|
12742
|
-
classes?: ("always" | "never")
|
|
12757
|
+
type StylePaddedBlocks = []|[(("always" | "never" | "start" | "end") | {
|
|
12758
|
+
blocks?: ("always" | "never" | "start" | "end")
|
|
12759
|
+
switches?: ("always" | "never" | "start" | "end")
|
|
12760
|
+
classes?: ("always" | "never" | "start" | "end")
|
|
12761
|
+
})]|[(("always" | "never" | "start" | "end") | {
|
|
12762
|
+
blocks?: ("always" | "never" | "start" | "end")
|
|
12763
|
+
switches?: ("always" | "never" | "start" | "end")
|
|
12764
|
+
classes?: ("always" | "never" | "start" | "end")
|
|
12743
12765
|
}), {
|
|
12744
12766
|
allowSingleLineBlocks?: boolean
|
|
12745
12767
|
}]
|
|
@@ -14882,6 +14904,7 @@ type VueKeySpacing = []|[({
|
|
|
14882
14904
|
mode?: ("strict" | "minimum")
|
|
14883
14905
|
beforeColon?: boolean
|
|
14884
14906
|
afterColon?: boolean
|
|
14907
|
+
ignoredNodes?: ("ObjectExpression" | "ObjectPattern" | "ImportDeclaration" | "ExportNamedDeclaration" | "ExportAllDeclaration" | "TSTypeLiteral" | "TSInterfaceBody" | "ClassBody")[]
|
|
14885
14908
|
} | {
|
|
14886
14909
|
singleLine?: {
|
|
14887
14910
|
mode?: ("strict" | "minimum")
|
|
@@ -15408,6 +15431,7 @@ type VueNoExtraParens = ([]|["functions"] | []|["all"]|["all", {
|
|
|
15408
15431
|
enforceForNewInMemberExpressions?: boolean
|
|
15409
15432
|
enforceForFunctionPrototypeMethods?: boolean
|
|
15410
15433
|
allowParensAfterCommentPattern?: string
|
|
15434
|
+
nestedConditionalExpressions?: boolean
|
|
15411
15435
|
}])
|
|
15412
15436
|
// ----- vue/no-irregular-whitespace -----
|
|
15413
15437
|
type VueNoIrregularWhitespace = []|[{
|
package/dist/index.js
CHANGED
|
@@ -1269,7 +1269,8 @@ async function react(options = {}) {
|
|
|
1269
1269
|
"react-hooks": pluginReactHooks,
|
|
1270
1270
|
"react-hooks-extra": plugins["@eslint-react/hooks-extra"],
|
|
1271
1271
|
"react-naming-convention": plugins["@eslint-react/naming-convention"],
|
|
1272
|
-
"react-refresh": pluginReactRefresh
|
|
1272
|
+
"react-refresh": pluginReactRefresh,
|
|
1273
|
+
"react-web-api": plugins["@eslint-react/web-api"]
|
|
1273
1274
|
}
|
|
1274
1275
|
},
|
|
1275
1276
|
{
|
|
@@ -1330,6 +1331,11 @@ async function react(options = {}) {
|
|
|
1330
1331
|
]
|
|
1331
1332
|
}
|
|
1332
1333
|
],
|
|
1334
|
+
// recommended rules from @eslint-react/web-api
|
|
1335
|
+
"react-web-api/no-leaked-event-listener": "warn",
|
|
1336
|
+
"react-web-api/no-leaked-interval": "warn",
|
|
1337
|
+
"react-web-api/no-leaked-resize-observer": "warn",
|
|
1338
|
+
"react-web-api/no-leaked-timeout": "warn",
|
|
1333
1339
|
// recommended rules from @eslint-react
|
|
1334
1340
|
"react/ensure-forward-ref-using-ref": "warn",
|
|
1335
1341
|
"react/jsx-no-duplicate-props": "warn",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhzh/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.18.0",
|
|
5
5
|
"description": "Lyle's ESLint config",
|
|
6
6
|
"author": "Lyle Zheng <dhzhme@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -74,15 +74,15 @@
|
|
|
74
74
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
75
75
|
"@eslint-react/eslint-plugin": "^1.23.2",
|
|
76
76
|
"@eslint/markdown": "^6.2.1",
|
|
77
|
-
"@stylistic/eslint-plugin": "^2.
|
|
77
|
+
"@stylistic/eslint-plugin": "^2.13.0",
|
|
78
78
|
"@typescript-eslint/eslint-plugin": "^8.19.1",
|
|
79
79
|
"@typescript-eslint/parser": "^8.19.1",
|
|
80
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
80
|
+
"@vitest/eslint-plugin": "^1.1.25",
|
|
81
81
|
"eslint-config-flat-gitignore": "^1.0.0",
|
|
82
82
|
"eslint-flat-config-utils": "^1.0.0",
|
|
83
83
|
"eslint-merge-processors": "^1.0.0",
|
|
84
84
|
"eslint-plugin-antfu": "^2.7.0",
|
|
85
|
-
"eslint-plugin-command": "^2.0
|
|
85
|
+
"eslint-plugin-command": "^2.1.0",
|
|
86
86
|
"eslint-plugin-import-x": "^4.6.1",
|
|
87
87
|
"eslint-plugin-jsdoc": "^50.6.1",
|
|
88
88
|
"eslint-plugin-jsonc": "^2.18.2",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
91
91
|
"eslint-plugin-perfectionist": "^4.6.0",
|
|
92
92
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
93
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
93
|
+
"eslint-plugin-react-refresh": "^0.4.18",
|
|
94
94
|
"eslint-plugin-regexp": "^2.7.0",
|
|
95
95
|
"eslint-plugin-toml": "^0.12.0",
|
|
96
96
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
@@ -112,21 +112,21 @@
|
|
|
112
112
|
"@antfu/ni": "^23.2.0",
|
|
113
113
|
"@eslint/config-inspector": "^0.7.1",
|
|
114
114
|
"@prettier/plugin-xml": "^3.4.1",
|
|
115
|
-
"@stylistic/eslint-plugin-migrate": "^2.
|
|
115
|
+
"@stylistic/eslint-plugin-migrate": "^2.13.0",
|
|
116
116
|
"@types/fs-extra": "^11.0.4",
|
|
117
117
|
"@types/node": "^22.10.5",
|
|
118
118
|
"@types/prompts": "^2.4.9",
|
|
119
119
|
"@types/yargs": "^17.0.33",
|
|
120
|
-
"@unocss/eslint-plugin": "^
|
|
120
|
+
"@unocss/eslint-plugin": "^65.4.0",
|
|
121
121
|
"astro-eslint-parser": "^1.1.0",
|
|
122
122
|
"bumpp": "^9.10.0",
|
|
123
123
|
"bundle-require": "^5.0.0",
|
|
124
|
-
"eslint": "^9.
|
|
124
|
+
"eslint": "^9.18.0",
|
|
125
125
|
"eslint-plugin-astro": "^1.3.1",
|
|
126
126
|
"eslint-plugin-format": "^1.0.1",
|
|
127
127
|
"eslint-plugin-solid": "^0.14.5",
|
|
128
128
|
"eslint-plugin-svelte": "^2.46.1",
|
|
129
|
-
"eslint-typegen": "^0.
|
|
129
|
+
"eslint-typegen": "^1.0.0",
|
|
130
130
|
"execa": "^9.5.2",
|
|
131
131
|
"fast-glob": "^3.3.3",
|
|
132
132
|
"fs-extra": "^11.2.0",
|
|
@@ -144,14 +144,14 @@
|
|
|
144
144
|
"resolutions": {
|
|
145
145
|
"@eslint-community/eslint-utils": "^4.4.1",
|
|
146
146
|
"@typescript-eslint/utils": "^8.19.1",
|
|
147
|
-
"eslint": "^9.
|
|
147
|
+
"eslint": "^9.18.0",
|
|
148
148
|
"tsx": "^4.19.2"
|
|
149
149
|
},
|
|
150
150
|
"simple-git-hooks": {
|
|
151
151
|
"pre-commit": "npx lint-staged"
|
|
152
152
|
},
|
|
153
153
|
"lint-staged": {
|
|
154
|
-
"*": "eslint --
|
|
154
|
+
"*": "eslint --fix"
|
|
155
155
|
},
|
|
156
156
|
"scripts": {
|
|
157
157
|
"build": "nr typegen && tsup --format esm,cjs --clean --dts",
|
|
@@ -159,8 +159,8 @@
|
|
|
159
159
|
"dev": "npx @eslint/config-inspector --config eslint.config.ts",
|
|
160
160
|
"build:inspector": "pnpm build && npx @eslint/config-inspector build",
|
|
161
161
|
"watch": "tsup --format esm,cjs --watch",
|
|
162
|
-
"lint": "eslint
|
|
163
|
-
"lint-fix": "eslint --fix
|
|
162
|
+
"lint": "eslint .",
|
|
163
|
+
"lint-fix": "eslint --fix .",
|
|
164
164
|
"typegen": "tsx scripts/typegen.ts",
|
|
165
165
|
"release": "bumpp && pnpm publish --access=public",
|
|
166
166
|
"typecheck": "tsc --noEmit"
|