@dhzh/eslint-config 0.8.0 → 0.8.2
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 +16 -13
- package/dist/cli.js +16 -13
- package/dist/index.cjs +13 -1
- package/dist/index.d.cts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.js +13 -1
- package/package.json +7 -8
package/dist/cli.cjs
CHANGED
|
@@ -48,7 +48,7 @@ var import_picocolors = __toESM(require("picocolors"), 1);
|
|
|
48
48
|
var package_default = {
|
|
49
49
|
name: "@dhzh/eslint-config",
|
|
50
50
|
type: "module",
|
|
51
|
-
version: "0.8.
|
|
51
|
+
version: "0.8.2",
|
|
52
52
|
packageManager: "pnpm@9.1.4",
|
|
53
53
|
description: "Easton's ESLint config",
|
|
54
54
|
author: "Easton Zheng <dhzhme@gmail.com>",
|
|
@@ -88,9 +88,9 @@ var package_default = {
|
|
|
88
88
|
peerDependencies: {
|
|
89
89
|
"@prettier/plugin-xml": "^3.4.1",
|
|
90
90
|
"@unocss/eslint-plugin": ">=0.50.0",
|
|
91
|
-
"astro-eslint-parser": "^0.
|
|
91
|
+
"astro-eslint-parser": "^1.0.2",
|
|
92
92
|
eslint: ">=8.40.0",
|
|
93
|
-
"eslint-plugin-astro": "^
|
|
93
|
+
"eslint-plugin-astro": "^1.2.0",
|
|
94
94
|
"eslint-plugin-format": ">=0.1.0",
|
|
95
95
|
"eslint-plugin-solid": "^0.13.2",
|
|
96
96
|
"eslint-plugin-svelte": ">=2.35.1",
|
|
@@ -173,7 +173,7 @@ var package_default = {
|
|
|
173
173
|
devDependencies: {
|
|
174
174
|
"@antfu/ni": "^0.21.12",
|
|
175
175
|
"@dhzh/eslint-config": "workspace:*",
|
|
176
|
-
"@eslint/config-inspector": "^0.4.
|
|
176
|
+
"@eslint/config-inspector": "^0.4.10",
|
|
177
177
|
"@prettier/plugin-xml": "^3.4.1",
|
|
178
178
|
"@stylistic/eslint-plugin-migrate": "^2.1.0",
|
|
179
179
|
"@types/eslint": "^8.56.10",
|
|
@@ -184,13 +184,12 @@ var package_default = {
|
|
|
184
184
|
"@unocss/eslint-plugin": "^0.60.4",
|
|
185
185
|
"astro-eslint-parser": "^1.0.2",
|
|
186
186
|
bumpp: "^9.4.1",
|
|
187
|
-
|
|
188
|
-
eslint: "npm:eslint-ts-patch@9.2.0-6",
|
|
187
|
+
eslint: "npm:eslint-ts-patch@9.4.0-0",
|
|
189
188
|
"eslint-plugin-astro": "^1.2.0",
|
|
190
189
|
"eslint-plugin-format": "^0.1.1",
|
|
191
190
|
"eslint-plugin-solid": "^0.14.0",
|
|
192
191
|
"eslint-plugin-svelte": "^2.39.0",
|
|
193
|
-
"eslint-ts-patch": "9.
|
|
192
|
+
"eslint-ts-patch": "9.4.0-0",
|
|
194
193
|
"eslint-typegen": "^0.2.4",
|
|
195
194
|
esno: "^4.7.0",
|
|
196
195
|
execa: "^9.1.0",
|
|
@@ -269,14 +268,11 @@ var vscodeSettingsString = `
|
|
|
269
268
|
"css",
|
|
270
269
|
"less",
|
|
271
270
|
"scss",
|
|
271
|
+
"pcss",
|
|
272
|
+
"postcss",
|
|
272
273
|
"gql",
|
|
273
274
|
"graphql",
|
|
274
|
-
"astro"
|
|
275
|
-
"css",
|
|
276
|
-
"less",
|
|
277
|
-
"scss",
|
|
278
|
-
"pcss",
|
|
279
|
-
"postcss"
|
|
275
|
+
"astro"
|
|
280
276
|
],
|
|
281
277
|
|
|
282
278
|
// Enable eslint as the default formatter
|
|
@@ -325,6 +321,12 @@ var vscodeSettingsString = `
|
|
|
325
321
|
"[scss]": {
|
|
326
322
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
327
323
|
},
|
|
324
|
+
"[pcss]": {
|
|
325
|
+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
326
|
+
},
|
|
327
|
+
"[postcss]": {
|
|
328
|
+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
329
|
+
},
|
|
328
330
|
"[gql]": {
|
|
329
331
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
330
332
|
},
|
|
@@ -383,6 +385,7 @@ var dependenciesMap = {
|
|
|
383
385
|
"eslint-plugin-astro",
|
|
384
386
|
"astro-eslint-parser"
|
|
385
387
|
],
|
|
388
|
+
nest: [],
|
|
386
389
|
react: [],
|
|
387
390
|
slidev: [
|
|
388
391
|
"prettier-plugin-slidev"
|
package/dist/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ import c from "picocolors";
|
|
|
19
19
|
var package_default = {
|
|
20
20
|
name: "@dhzh/eslint-config",
|
|
21
21
|
type: "module",
|
|
22
|
-
version: "0.8.
|
|
22
|
+
version: "0.8.2",
|
|
23
23
|
packageManager: "pnpm@9.1.4",
|
|
24
24
|
description: "Easton's ESLint config",
|
|
25
25
|
author: "Easton Zheng <dhzhme@gmail.com>",
|
|
@@ -59,9 +59,9 @@ var package_default = {
|
|
|
59
59
|
peerDependencies: {
|
|
60
60
|
"@prettier/plugin-xml": "^3.4.1",
|
|
61
61
|
"@unocss/eslint-plugin": ">=0.50.0",
|
|
62
|
-
"astro-eslint-parser": "^0.
|
|
62
|
+
"astro-eslint-parser": "^1.0.2",
|
|
63
63
|
eslint: ">=8.40.0",
|
|
64
|
-
"eslint-plugin-astro": "^
|
|
64
|
+
"eslint-plugin-astro": "^1.2.0",
|
|
65
65
|
"eslint-plugin-format": ">=0.1.0",
|
|
66
66
|
"eslint-plugin-solid": "^0.13.2",
|
|
67
67
|
"eslint-plugin-svelte": ">=2.35.1",
|
|
@@ -144,7 +144,7 @@ var package_default = {
|
|
|
144
144
|
devDependencies: {
|
|
145
145
|
"@antfu/ni": "^0.21.12",
|
|
146
146
|
"@dhzh/eslint-config": "workspace:*",
|
|
147
|
-
"@eslint/config-inspector": "^0.4.
|
|
147
|
+
"@eslint/config-inspector": "^0.4.10",
|
|
148
148
|
"@prettier/plugin-xml": "^3.4.1",
|
|
149
149
|
"@stylistic/eslint-plugin-migrate": "^2.1.0",
|
|
150
150
|
"@types/eslint": "^8.56.10",
|
|
@@ -155,13 +155,12 @@ var package_default = {
|
|
|
155
155
|
"@unocss/eslint-plugin": "^0.60.4",
|
|
156
156
|
"astro-eslint-parser": "^1.0.2",
|
|
157
157
|
bumpp: "^9.4.1",
|
|
158
|
-
|
|
159
|
-
eslint: "npm:eslint-ts-patch@9.2.0-6",
|
|
158
|
+
eslint: "npm:eslint-ts-patch@9.4.0-0",
|
|
160
159
|
"eslint-plugin-astro": "^1.2.0",
|
|
161
160
|
"eslint-plugin-format": "^0.1.1",
|
|
162
161
|
"eslint-plugin-solid": "^0.14.0",
|
|
163
162
|
"eslint-plugin-svelte": "^2.39.0",
|
|
164
|
-
"eslint-ts-patch": "9.
|
|
163
|
+
"eslint-ts-patch": "9.4.0-0",
|
|
165
164
|
"eslint-typegen": "^0.2.4",
|
|
166
165
|
esno: "^4.7.0",
|
|
167
166
|
execa: "^9.1.0",
|
|
@@ -240,14 +239,11 @@ var vscodeSettingsString = `
|
|
|
240
239
|
"css",
|
|
241
240
|
"less",
|
|
242
241
|
"scss",
|
|
242
|
+
"pcss",
|
|
243
|
+
"postcss",
|
|
243
244
|
"gql",
|
|
244
245
|
"graphql",
|
|
245
|
-
"astro"
|
|
246
|
-
"css",
|
|
247
|
-
"less",
|
|
248
|
-
"scss",
|
|
249
|
-
"pcss",
|
|
250
|
-
"postcss"
|
|
246
|
+
"astro"
|
|
251
247
|
],
|
|
252
248
|
|
|
253
249
|
// Enable eslint as the default formatter
|
|
@@ -296,6 +292,12 @@ var vscodeSettingsString = `
|
|
|
296
292
|
"[scss]": {
|
|
297
293
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
298
294
|
},
|
|
295
|
+
"[pcss]": {
|
|
296
|
+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
297
|
+
},
|
|
298
|
+
"[postcss]": {
|
|
299
|
+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
300
|
+
},
|
|
299
301
|
"[gql]": {
|
|
300
302
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
301
303
|
},
|
|
@@ -354,6 +356,7 @@ var dependenciesMap = {
|
|
|
354
356
|
"eslint-plugin-astro",
|
|
355
357
|
"astro-eslint-parser"
|
|
356
358
|
],
|
|
359
|
+
nest: [],
|
|
357
360
|
react: [],
|
|
358
361
|
slidev: [
|
|
359
362
|
"prettier-plugin-slidev"
|
package/dist/index.cjs
CHANGED
|
@@ -291,16 +291,28 @@ async function astro(options = {}) {
|
|
|
291
291
|
{
|
|
292
292
|
files,
|
|
293
293
|
languageOptions: {
|
|
294
|
+
globals: pluginAstro.environments.astro.globals,
|
|
294
295
|
parser: parserAstro,
|
|
295
296
|
parserOptions: {
|
|
296
297
|
extraFileExtensions: [".astro"],
|
|
297
298
|
parser: parserTs
|
|
298
|
-
}
|
|
299
|
+
},
|
|
300
|
+
sourceType: "module"
|
|
299
301
|
},
|
|
300
302
|
name: "antfu/astro/rules",
|
|
303
|
+
processor: "astro/client-side-ts",
|
|
301
304
|
rules: {
|
|
305
|
+
// use recommended rules
|
|
306
|
+
"astro/missing-client-only-directive-value": "error",
|
|
307
|
+
"astro/no-conflict-set-directives": "error",
|
|
308
|
+
"astro/no-deprecated-astro-canonicalurl": "error",
|
|
309
|
+
"astro/no-deprecated-astro-fetchcontent": "error",
|
|
310
|
+
"astro/no-deprecated-astro-resolve": "error",
|
|
311
|
+
"astro/no-deprecated-getentrybyslug": "error",
|
|
302
312
|
"astro/no-set-html-directive": "off",
|
|
313
|
+
"astro/no-unused-define-vars-in-style": "error",
|
|
303
314
|
"astro/semi": "off",
|
|
315
|
+
"astro/valid-compile": "error",
|
|
304
316
|
...stylistic2 ? {
|
|
305
317
|
"style/indent": "off",
|
|
306
318
|
"style/jsx-closing-tag-location": "off",
|
package/dist/index.d.cts
CHANGED
|
@@ -678,7 +678,7 @@ interface RuleOptions {
|
|
|
678
678
|
*/
|
|
679
679
|
'func-names'?: Linter.RuleEntry<FuncNames>
|
|
680
680
|
/**
|
|
681
|
-
* Enforce the consistent use of either `function` declarations or expressions
|
|
681
|
+
* Enforce the consistent use of either `function` declarations or expressions assigned to variables
|
|
682
682
|
* @see https://eslint.org/docs/latest/rules/func-style
|
|
683
683
|
*/
|
|
684
684
|
'func-style'?: Linter.RuleEntry<FuncStyle>
|
|
@@ -1501,6 +1501,7 @@ interface RuleOptions {
|
|
|
1501
1501
|
/**
|
|
1502
1502
|
* Enforce position of line comments
|
|
1503
1503
|
* @see https://eslint.org/docs/latest/rules/line-comment-position
|
|
1504
|
+
* @deprecated
|
|
1504
1505
|
*/
|
|
1505
1506
|
'line-comment-position'?: Linter.RuleEntry<LineCommentPosition>
|
|
1506
1507
|
/**
|
|
@@ -1582,6 +1583,7 @@ interface RuleOptions {
|
|
|
1582
1583
|
/**
|
|
1583
1584
|
* Enforce a particular style for multiline comments
|
|
1584
1585
|
* @see https://eslint.org/docs/latest/rules/multiline-comment-style
|
|
1586
|
+
* @deprecated
|
|
1585
1587
|
*/
|
|
1586
1588
|
'multiline-comment-style'?: Linter.RuleEntry<MultilineCommentStyle>
|
|
1587
1589
|
/**
|
|
@@ -1954,7 +1956,7 @@ interface RuleOptions {
|
|
|
1954
1956
|
* Disallow characters which are made with multiple code points in character class syntax
|
|
1955
1957
|
* @see https://eslint.org/docs/latest/rules/no-misleading-character-class
|
|
1956
1958
|
*/
|
|
1957
|
-
'no-misleading-character-class'?: Linter.RuleEntry<
|
|
1959
|
+
'no-misleading-character-class'?: Linter.RuleEntry<NoMisleadingCharacterClass>
|
|
1958
1960
|
/**
|
|
1959
1961
|
* Disallow mixed binary operators
|
|
1960
1962
|
* @see https://eslint.org/docs/latest/rules/no-mixed-operators
|
|
@@ -8053,6 +8055,9 @@ type _FuncNamesValue = ("always" | "as-needed" | "never")
|
|
|
8053
8055
|
// ----- func-style -----
|
|
8054
8056
|
type FuncStyle = []|[("declaration" | "expression")]|[("declaration" | "expression"), {
|
|
8055
8057
|
allowArrowFunctions?: boolean
|
|
8058
|
+
overrides?: {
|
|
8059
|
+
namedExports?: ("declaration" | "expression" | "ignore")
|
|
8060
|
+
}
|
|
8056
8061
|
}]
|
|
8057
8062
|
// ----- function-call-argument-newline -----
|
|
8058
8063
|
type FunctionCallArgumentNewline = []|[("always" | "never" | "consistent")]
|
|
@@ -9662,9 +9667,11 @@ type NoExtendNative = []|[{
|
|
|
9662
9667
|
exceptions?: string[]
|
|
9663
9668
|
}]
|
|
9664
9669
|
// ----- no-extra-boolean-cast -----
|
|
9665
|
-
type NoExtraBooleanCast = []|[{
|
|
9670
|
+
type NoExtraBooleanCast = []|[({
|
|
9671
|
+
enforceForInnerExpressions?: boolean
|
|
9672
|
+
} | {
|
|
9666
9673
|
enforceForLogicalOperands?: boolean
|
|
9667
|
-
}]
|
|
9674
|
+
})]
|
|
9668
9675
|
// ----- no-extra-parens -----
|
|
9669
9676
|
type NoExtraParens = ([]|["functions"] | []|["all"]|["all", {
|
|
9670
9677
|
conditionalAssign?: boolean
|
|
@@ -9738,6 +9745,10 @@ type NoMagicNumbers = []|[{
|
|
|
9738
9745
|
ignoreDefaultValues?: boolean
|
|
9739
9746
|
ignoreClassFieldInitialValues?: boolean
|
|
9740
9747
|
}]
|
|
9748
|
+
// ----- no-misleading-character-class -----
|
|
9749
|
+
type NoMisleadingCharacterClass = []|[{
|
|
9750
|
+
allowEscape?: boolean
|
|
9751
|
+
}]
|
|
9741
9752
|
// ----- no-mixed-operators -----
|
|
9742
9753
|
type NoMixedOperators = []|[{
|
|
9743
9754
|
groups?: [("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ...(("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"))[]][]
|
|
@@ -9794,8 +9805,10 @@ type NoRedeclare = []|[{
|
|
|
9794
9805
|
// ----- no-restricted-exports -----
|
|
9795
9806
|
type NoRestrictedExports = []|[({
|
|
9796
9807
|
restrictedNamedExports?: string[]
|
|
9808
|
+
restrictedNamedExportsPattern?: string
|
|
9797
9809
|
} | {
|
|
9798
9810
|
restrictedNamedExports?: string[]
|
|
9811
|
+
restrictedNamedExportsPattern?: string
|
|
9799
9812
|
restrictDefaultExports?: {
|
|
9800
9813
|
direct?: boolean
|
|
9801
9814
|
named?: boolean
|
package/dist/index.d.ts
CHANGED
|
@@ -678,7 +678,7 @@ interface RuleOptions {
|
|
|
678
678
|
*/
|
|
679
679
|
'func-names'?: Linter.RuleEntry<FuncNames>
|
|
680
680
|
/**
|
|
681
|
-
* Enforce the consistent use of either `function` declarations or expressions
|
|
681
|
+
* Enforce the consistent use of either `function` declarations or expressions assigned to variables
|
|
682
682
|
* @see https://eslint.org/docs/latest/rules/func-style
|
|
683
683
|
*/
|
|
684
684
|
'func-style'?: Linter.RuleEntry<FuncStyle>
|
|
@@ -1501,6 +1501,7 @@ interface RuleOptions {
|
|
|
1501
1501
|
/**
|
|
1502
1502
|
* Enforce position of line comments
|
|
1503
1503
|
* @see https://eslint.org/docs/latest/rules/line-comment-position
|
|
1504
|
+
* @deprecated
|
|
1504
1505
|
*/
|
|
1505
1506
|
'line-comment-position'?: Linter.RuleEntry<LineCommentPosition>
|
|
1506
1507
|
/**
|
|
@@ -1582,6 +1583,7 @@ interface RuleOptions {
|
|
|
1582
1583
|
/**
|
|
1583
1584
|
* Enforce a particular style for multiline comments
|
|
1584
1585
|
* @see https://eslint.org/docs/latest/rules/multiline-comment-style
|
|
1586
|
+
* @deprecated
|
|
1585
1587
|
*/
|
|
1586
1588
|
'multiline-comment-style'?: Linter.RuleEntry<MultilineCommentStyle>
|
|
1587
1589
|
/**
|
|
@@ -1954,7 +1956,7 @@ interface RuleOptions {
|
|
|
1954
1956
|
* Disallow characters which are made with multiple code points in character class syntax
|
|
1955
1957
|
* @see https://eslint.org/docs/latest/rules/no-misleading-character-class
|
|
1956
1958
|
*/
|
|
1957
|
-
'no-misleading-character-class'?: Linter.RuleEntry<
|
|
1959
|
+
'no-misleading-character-class'?: Linter.RuleEntry<NoMisleadingCharacterClass>
|
|
1958
1960
|
/**
|
|
1959
1961
|
* Disallow mixed binary operators
|
|
1960
1962
|
* @see https://eslint.org/docs/latest/rules/no-mixed-operators
|
|
@@ -8053,6 +8055,9 @@ type _FuncNamesValue = ("always" | "as-needed" | "never")
|
|
|
8053
8055
|
// ----- func-style -----
|
|
8054
8056
|
type FuncStyle = []|[("declaration" | "expression")]|[("declaration" | "expression"), {
|
|
8055
8057
|
allowArrowFunctions?: boolean
|
|
8058
|
+
overrides?: {
|
|
8059
|
+
namedExports?: ("declaration" | "expression" | "ignore")
|
|
8060
|
+
}
|
|
8056
8061
|
}]
|
|
8057
8062
|
// ----- function-call-argument-newline -----
|
|
8058
8063
|
type FunctionCallArgumentNewline = []|[("always" | "never" | "consistent")]
|
|
@@ -9662,9 +9667,11 @@ type NoExtendNative = []|[{
|
|
|
9662
9667
|
exceptions?: string[]
|
|
9663
9668
|
}]
|
|
9664
9669
|
// ----- no-extra-boolean-cast -----
|
|
9665
|
-
type NoExtraBooleanCast = []|[{
|
|
9670
|
+
type NoExtraBooleanCast = []|[({
|
|
9671
|
+
enforceForInnerExpressions?: boolean
|
|
9672
|
+
} | {
|
|
9666
9673
|
enforceForLogicalOperands?: boolean
|
|
9667
|
-
}]
|
|
9674
|
+
})]
|
|
9668
9675
|
// ----- no-extra-parens -----
|
|
9669
9676
|
type NoExtraParens = ([]|["functions"] | []|["all"]|["all", {
|
|
9670
9677
|
conditionalAssign?: boolean
|
|
@@ -9738,6 +9745,10 @@ type NoMagicNumbers = []|[{
|
|
|
9738
9745
|
ignoreDefaultValues?: boolean
|
|
9739
9746
|
ignoreClassFieldInitialValues?: boolean
|
|
9740
9747
|
}]
|
|
9748
|
+
// ----- no-misleading-character-class -----
|
|
9749
|
+
type NoMisleadingCharacterClass = []|[{
|
|
9750
|
+
allowEscape?: boolean
|
|
9751
|
+
}]
|
|
9741
9752
|
// ----- no-mixed-operators -----
|
|
9742
9753
|
type NoMixedOperators = []|[{
|
|
9743
9754
|
groups?: [("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ...(("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"))[]][]
|
|
@@ -9794,8 +9805,10 @@ type NoRedeclare = []|[{
|
|
|
9794
9805
|
// ----- no-restricted-exports -----
|
|
9795
9806
|
type NoRestrictedExports = []|[({
|
|
9796
9807
|
restrictedNamedExports?: string[]
|
|
9808
|
+
restrictedNamedExportsPattern?: string
|
|
9797
9809
|
} | {
|
|
9798
9810
|
restrictedNamedExports?: string[]
|
|
9811
|
+
restrictedNamedExportsPattern?: string
|
|
9799
9812
|
restrictDefaultExports?: {
|
|
9800
9813
|
direct?: boolean
|
|
9801
9814
|
named?: boolean
|
package/dist/index.js
CHANGED
|
@@ -189,16 +189,28 @@ async function astro(options = {}) {
|
|
|
189
189
|
{
|
|
190
190
|
files,
|
|
191
191
|
languageOptions: {
|
|
192
|
+
globals: pluginAstro.environments.astro.globals,
|
|
192
193
|
parser: parserAstro,
|
|
193
194
|
parserOptions: {
|
|
194
195
|
extraFileExtensions: [".astro"],
|
|
195
196
|
parser: parserTs
|
|
196
|
-
}
|
|
197
|
+
},
|
|
198
|
+
sourceType: "module"
|
|
197
199
|
},
|
|
198
200
|
name: "antfu/astro/rules",
|
|
201
|
+
processor: "astro/client-side-ts",
|
|
199
202
|
rules: {
|
|
203
|
+
// use recommended rules
|
|
204
|
+
"astro/missing-client-only-directive-value": "error",
|
|
205
|
+
"astro/no-conflict-set-directives": "error",
|
|
206
|
+
"astro/no-deprecated-astro-canonicalurl": "error",
|
|
207
|
+
"astro/no-deprecated-astro-fetchcontent": "error",
|
|
208
|
+
"astro/no-deprecated-astro-resolve": "error",
|
|
209
|
+
"astro/no-deprecated-getentrybyslug": "error",
|
|
200
210
|
"astro/no-set-html-directive": "off",
|
|
211
|
+
"astro/no-unused-define-vars-in-style": "error",
|
|
201
212
|
"astro/semi": "off",
|
|
213
|
+
"astro/valid-compile": "error",
|
|
202
214
|
...stylistic2 ? {
|
|
203
215
|
"style/indent": "off",
|
|
204
216
|
"style/jsx-closing-tag-location": "off",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhzh/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.2",
|
|
5
5
|
"description": "Easton's ESLint config",
|
|
6
6
|
"author": "Easton Zheng <dhzhme@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@prettier/plugin-xml": "^3.4.1",
|
|
28
28
|
"@unocss/eslint-plugin": ">=0.50.0",
|
|
29
|
-
"astro-eslint-parser": "^0.
|
|
29
|
+
"astro-eslint-parser": "^1.0.2",
|
|
30
30
|
"eslint": ">=8.40.0",
|
|
31
|
-
"eslint-plugin-astro": "^
|
|
31
|
+
"eslint-plugin-astro": "^1.2.0",
|
|
32
32
|
"eslint-plugin-format": ">=0.1.0",
|
|
33
33
|
"eslint-plugin-solid": "^0.13.2",
|
|
34
34
|
"eslint-plugin-svelte": ">=2.35.1",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
112
|
"@antfu/ni": "^0.21.12",
|
|
113
|
-
"@eslint/config-inspector": "^0.4.
|
|
113
|
+
"@eslint/config-inspector": "^0.4.10",
|
|
114
114
|
"@prettier/plugin-xml": "^3.4.1",
|
|
115
115
|
"@stylistic/eslint-plugin-migrate": "^2.1.0",
|
|
116
116
|
"@types/eslint": "^8.56.10",
|
|
@@ -121,13 +121,12 @@
|
|
|
121
121
|
"@unocss/eslint-plugin": "^0.60.4",
|
|
122
122
|
"astro-eslint-parser": "^1.0.2",
|
|
123
123
|
"bumpp": "^9.4.1",
|
|
124
|
-
"
|
|
125
|
-
"eslint": "npm:eslint-ts-patch@9.2.0-6",
|
|
124
|
+
"eslint": "npm:eslint-ts-patch@9.4.0-0",
|
|
126
125
|
"eslint-plugin-astro": "^1.2.0",
|
|
127
126
|
"eslint-plugin-format": "^0.1.1",
|
|
128
127
|
"eslint-plugin-solid": "^0.14.0",
|
|
129
128
|
"eslint-plugin-svelte": "^2.39.0",
|
|
130
|
-
"eslint-ts-patch": "9.
|
|
129
|
+
"eslint-ts-patch": "9.4.0-0",
|
|
131
130
|
"eslint-typegen": "^0.2.4",
|
|
132
131
|
"esno": "^4.7.0",
|
|
133
132
|
"execa": "^9.1.0",
|
|
@@ -145,7 +144,7 @@
|
|
|
145
144
|
"typescript": "^5.4.5",
|
|
146
145
|
"vitest": "^1.6.0",
|
|
147
146
|
"vue": "^3.4.27",
|
|
148
|
-
"@dhzh/eslint-config": "0.8.
|
|
147
|
+
"@dhzh/eslint-config": "0.8.2"
|
|
149
148
|
},
|
|
150
149
|
"simple-git-hooks": {
|
|
151
150
|
"pre-commit": "npx lint-staged"
|