@antfu/eslint-config 3.4.1 → 3.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/README.md +8 -1
- package/dist/cli.cjs +10 -10
- package/dist/cli.js +10 -10
- package/dist/index.cjs +3 -6
- package/dist/index.d.cts +45 -1
- package/dist/index.d.ts +45 -1
- package/dist/index.js +2 -5
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -16,11 +16,18 @@
|
|
|
16
16
|
- Respects `.gitignore` by default
|
|
17
17
|
- Requires ESLint v9.5.0+
|
|
18
18
|
|
|
19
|
-
> [!
|
|
19
|
+
> [!NOTE]
|
|
20
20
|
> Since v1.0.0, this config is rewritten to the new [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new), check the [release note](https://github.com/antfu/eslint-config/releases/tag/v1.0.0) for more details.
|
|
21
21
|
>
|
|
22
22
|
> Since v3.0.0, ESLint v9.5.0+ is now required.
|
|
23
23
|
|
|
24
|
+
> [!WARNING]
|
|
25
|
+
> I am super appreciated and even a bit flatted that so many of you are fond of using this config. For that, I tried to make it as flexible and customizable as possible to fit more use cases.
|
|
26
|
+
>
|
|
27
|
+
> However, please keep in mind that this is still **_a personal config_** with a lot opinions. Changes might not always be pleased by everyone and every use cases.
|
|
28
|
+
>
|
|
29
|
+
> If you are using this config directly, I'd suggest you **review the changes everytime you update**. Or if you want more control over the rules, always feel free to fork it. Thanks!
|
|
30
|
+
|
|
24
31
|
## Usage
|
|
25
32
|
|
|
26
33
|
### Starter Wizard
|
package/dist/cli.cjs
CHANGED
|
@@ -41,8 +41,8 @@ var import_picocolors = __toESM(require("picocolors"), 1);
|
|
|
41
41
|
var package_default = {
|
|
42
42
|
name: "@antfu/eslint-config",
|
|
43
43
|
type: "module",
|
|
44
|
-
version: "3.
|
|
45
|
-
packageManager: "pnpm@9.
|
|
44
|
+
version: "3.5.0",
|
|
45
|
+
packageManager: "pnpm@9.10.0",
|
|
46
46
|
description: "Anthony's ESLint config",
|
|
47
47
|
author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
48
48
|
license: "MIT",
|
|
@@ -139,9 +139,10 @@ var package_default = {
|
|
|
139
139
|
"@antfu/install-pkg": "^0.4.1",
|
|
140
140
|
"@clack/prompts": "^0.7.0",
|
|
141
141
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
142
|
-
"@
|
|
143
|
-
"@
|
|
144
|
-
"@typescript-eslint/
|
|
142
|
+
"@eslint/markdown": "^6.1.0",
|
|
143
|
+
"@stylistic/eslint-plugin": "^2.8.0",
|
|
144
|
+
"@typescript-eslint/eslint-plugin": "^8.5.0",
|
|
145
|
+
"@typescript-eslint/parser": "^8.5.0",
|
|
145
146
|
"@vitest/eslint-plugin": "^1.1.0",
|
|
146
147
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
147
148
|
"eslint-flat-config-utils": "^0.4.0",
|
|
@@ -151,7 +152,6 @@ var package_default = {
|
|
|
151
152
|
"eslint-plugin-import-x": "^4.2.1",
|
|
152
153
|
"eslint-plugin-jsdoc": "^50.2.2",
|
|
153
154
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
154
|
-
"eslint-plugin-markdown": "^5.1.0",
|
|
155
155
|
"eslint-plugin-n": "^17.10.2",
|
|
156
156
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
157
157
|
"eslint-plugin-perfectionist": "^3.5.0",
|
|
@@ -175,10 +175,10 @@ var package_default = {
|
|
|
175
175
|
devDependencies: {
|
|
176
176
|
"@antfu/eslint-config": "workspace:*",
|
|
177
177
|
"@antfu/ni": "^0.23.0",
|
|
178
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
178
|
+
"@eslint-react/eslint-plugin": "^1.14.0",
|
|
179
179
|
"@eslint/config-inspector": "^0.5.4",
|
|
180
180
|
"@prettier/plugin-xml": "^3.4.1",
|
|
181
|
-
"@stylistic/eslint-plugin-migrate": "^2.
|
|
181
|
+
"@stylistic/eslint-plugin-migrate": "^2.8.0",
|
|
182
182
|
"@types/fs-extra": "^11.0.4",
|
|
183
183
|
"@types/node": "^22.5.4",
|
|
184
184
|
"@types/prompts": "^2.4.9",
|
|
@@ -208,13 +208,13 @@ var package_default = {
|
|
|
208
208
|
"svelte-eslint-parser": "^0.41.0",
|
|
209
209
|
tsup: "^8.2.4",
|
|
210
210
|
tsx: "^4.19.0",
|
|
211
|
-
typescript: "^5.
|
|
211
|
+
typescript: "^5.6.2",
|
|
212
212
|
vitest: "^2.0.5",
|
|
213
213
|
vue: "^3.5.3"
|
|
214
214
|
},
|
|
215
215
|
resolutions: {
|
|
216
216
|
"@eslint-community/eslint-utils": "^4.4.0",
|
|
217
|
-
"@typescript-eslint/utils": "^8.
|
|
217
|
+
"@typescript-eslint/utils": "^8.5.0",
|
|
218
218
|
eslint: "^9.10.0",
|
|
219
219
|
tsx: "^4.19.0"
|
|
220
220
|
},
|
package/dist/cli.js
CHANGED
|
@@ -12,8 +12,8 @@ import c from "picocolors";
|
|
|
12
12
|
var package_default = {
|
|
13
13
|
name: "@antfu/eslint-config",
|
|
14
14
|
type: "module",
|
|
15
|
-
version: "3.
|
|
16
|
-
packageManager: "pnpm@9.
|
|
15
|
+
version: "3.5.0",
|
|
16
|
+
packageManager: "pnpm@9.10.0",
|
|
17
17
|
description: "Anthony's ESLint config",
|
|
18
18
|
author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
19
19
|
license: "MIT",
|
|
@@ -110,9 +110,10 @@ var package_default = {
|
|
|
110
110
|
"@antfu/install-pkg": "^0.4.1",
|
|
111
111
|
"@clack/prompts": "^0.7.0",
|
|
112
112
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
113
|
-
"@
|
|
114
|
-
"@
|
|
115
|
-
"@typescript-eslint/
|
|
113
|
+
"@eslint/markdown": "^6.1.0",
|
|
114
|
+
"@stylistic/eslint-plugin": "^2.8.0",
|
|
115
|
+
"@typescript-eslint/eslint-plugin": "^8.5.0",
|
|
116
|
+
"@typescript-eslint/parser": "^8.5.0",
|
|
116
117
|
"@vitest/eslint-plugin": "^1.1.0",
|
|
117
118
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
118
119
|
"eslint-flat-config-utils": "^0.4.0",
|
|
@@ -122,7 +123,6 @@ var package_default = {
|
|
|
122
123
|
"eslint-plugin-import-x": "^4.2.1",
|
|
123
124
|
"eslint-plugin-jsdoc": "^50.2.2",
|
|
124
125
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
125
|
-
"eslint-plugin-markdown": "^5.1.0",
|
|
126
126
|
"eslint-plugin-n": "^17.10.2",
|
|
127
127
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
128
128
|
"eslint-plugin-perfectionist": "^3.5.0",
|
|
@@ -146,10 +146,10 @@ var package_default = {
|
|
|
146
146
|
devDependencies: {
|
|
147
147
|
"@antfu/eslint-config": "workspace:*",
|
|
148
148
|
"@antfu/ni": "^0.23.0",
|
|
149
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
149
|
+
"@eslint-react/eslint-plugin": "^1.14.0",
|
|
150
150
|
"@eslint/config-inspector": "^0.5.4",
|
|
151
151
|
"@prettier/plugin-xml": "^3.4.1",
|
|
152
|
-
"@stylistic/eslint-plugin-migrate": "^2.
|
|
152
|
+
"@stylistic/eslint-plugin-migrate": "^2.8.0",
|
|
153
153
|
"@types/fs-extra": "^11.0.4",
|
|
154
154
|
"@types/node": "^22.5.4",
|
|
155
155
|
"@types/prompts": "^2.4.9",
|
|
@@ -179,13 +179,13 @@ var package_default = {
|
|
|
179
179
|
"svelte-eslint-parser": "^0.41.0",
|
|
180
180
|
tsup: "^8.2.4",
|
|
181
181
|
tsx: "^4.19.0",
|
|
182
|
-
typescript: "^5.
|
|
182
|
+
typescript: "^5.6.2",
|
|
183
183
|
vitest: "^2.0.5",
|
|
184
184
|
vue: "^3.5.3"
|
|
185
185
|
},
|
|
186
186
|
resolutions: {
|
|
187
187
|
"@eslint-community/eslint-utils": "^4.4.0",
|
|
188
|
-
"@typescript-eslint/utils": "^8.
|
|
188
|
+
"@typescript-eslint/utils": "^8.5.0",
|
|
189
189
|
eslint: "^9.10.0",
|
|
190
190
|
tsx: "^4.19.0"
|
|
191
191
|
},
|
package/dist/index.cjs
CHANGED
|
@@ -107,7 +107,7 @@ __export(src_exports, {
|
|
|
107
107
|
});
|
|
108
108
|
module.exports = __toCommonJS(src_exports);
|
|
109
109
|
|
|
110
|
-
// node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.44_tsx@4.19.0_typescript@5.
|
|
110
|
+
// node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.44_tsx@4.19.0_typescript@5.6.2_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js
|
|
111
111
|
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
112
112
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
113
113
|
|
|
@@ -394,8 +394,7 @@ async function disables() {
|
|
|
394
394
|
name: "antfu/disables/scripts",
|
|
395
395
|
rules: {
|
|
396
396
|
"no-console": "off",
|
|
397
|
-
"ts/explicit-function-return-type": "off"
|
|
398
|
-
"unicorn/consistent-function-scoping": "off"
|
|
397
|
+
"ts/explicit-function-return-type": "off"
|
|
399
398
|
}
|
|
400
399
|
},
|
|
401
400
|
{
|
|
@@ -1161,7 +1160,7 @@ async function markdown(options = {}) {
|
|
|
1161
1160
|
files = [GLOB_MARKDOWN],
|
|
1162
1161
|
overrides = {}
|
|
1163
1162
|
} = options;
|
|
1164
|
-
const markdown2 = await interopDefault(import("eslint
|
|
1163
|
+
const markdown2 = await interopDefault(import("@eslint/markdown"));
|
|
1165
1164
|
return [
|
|
1166
1165
|
{
|
|
1167
1166
|
name: "antfu/markdown/setup",
|
|
@@ -1912,7 +1911,6 @@ async function test(options = {}) {
|
|
|
1912
1911
|
"test/prefer-hooks-in-order": "error",
|
|
1913
1912
|
"test/prefer-lowercase-title": "error",
|
|
1914
1913
|
"ts/explicit-function-return-type": "off",
|
|
1915
|
-
"unicorn/consistent-function-scoping": "off",
|
|
1916
1914
|
...overrides
|
|
1917
1915
|
}
|
|
1918
1916
|
}
|
|
@@ -2141,7 +2139,6 @@ async function unicorn(options = {}) {
|
|
|
2141
2139
|
rules: {
|
|
2142
2140
|
...options.allRecommended ? import_eslint_plugin_unicorn.default.configs["flat/recommended"].rules : {
|
|
2143
2141
|
"unicorn/consistent-empty-array-spread": "error",
|
|
2144
|
-
"unicorn/consistent-function-scoping": ["error", { checkArrowFunctions: false }],
|
|
2145
2142
|
"unicorn/error-message": "error",
|
|
2146
2143
|
"unicorn/escape-case": "error",
|
|
2147
2144
|
"unicorn/new-for-builtins": "error",
|
package/dist/index.d.cts
CHANGED
|
@@ -1444,6 +1444,34 @@ interface RuleOptions {
|
|
|
1444
1444
|
* @see https://eslint.org/docs/latest/rules/logical-assignment-operators
|
|
1445
1445
|
*/
|
|
1446
1446
|
'logical-assignment-operators'?: Linter.RuleEntry<LogicalAssignmentOperators>
|
|
1447
|
+
/**
|
|
1448
|
+
* Require languages for fenced code blocks.
|
|
1449
|
+
*/
|
|
1450
|
+
'markdown/fenced-code-language'?: Linter.RuleEntry<MarkdownFencedCodeLanguage>
|
|
1451
|
+
/**
|
|
1452
|
+
* Enforce heading levels increment by one.
|
|
1453
|
+
*/
|
|
1454
|
+
'markdown/heading-increment'?: Linter.RuleEntry<[]>
|
|
1455
|
+
/**
|
|
1456
|
+
* Disallow duplicate headings in the same document.
|
|
1457
|
+
*/
|
|
1458
|
+
'markdown/no-duplicate-headings'?: Linter.RuleEntry<[]>
|
|
1459
|
+
/**
|
|
1460
|
+
* Disallow empty links.
|
|
1461
|
+
*/
|
|
1462
|
+
'markdown/no-empty-links'?: Linter.RuleEntry<[]>
|
|
1463
|
+
/**
|
|
1464
|
+
* Disallow HTML tags.
|
|
1465
|
+
*/
|
|
1466
|
+
'markdown/no-html'?: Linter.RuleEntry<MarkdownNoHtml>
|
|
1467
|
+
/**
|
|
1468
|
+
* Disallow invalid label references.
|
|
1469
|
+
*/
|
|
1470
|
+
'markdown/no-invalid-label-refs'?: Linter.RuleEntry<[]>
|
|
1471
|
+
/**
|
|
1472
|
+
* Disallow missing label references.
|
|
1473
|
+
*/
|
|
1474
|
+
'markdown/no-missing-label-refs'?: Linter.RuleEntry<[]>
|
|
1447
1475
|
/**
|
|
1448
1476
|
* Enforce a maximum number of classes per file
|
|
1449
1477
|
* @see https://eslint.org/docs/latest/rules/max-classes-per-file
|
|
@@ -9441,6 +9469,14 @@ type LinesBetweenClassMembers = []|[({
|
|
|
9441
9469
|
type LogicalAssignmentOperators = (([]|["always"]|["always", {
|
|
9442
9470
|
enforceForIfStatements?: boolean
|
|
9443
9471
|
}] | ["never"]) & unknown[])
|
|
9472
|
+
// ----- markdown/fenced-code-language -----
|
|
9473
|
+
type MarkdownFencedCodeLanguage = []|[{
|
|
9474
|
+
required?: string[]
|
|
9475
|
+
}]
|
|
9476
|
+
// ----- markdown/no-html -----
|
|
9477
|
+
type MarkdownNoHtml = []|[{
|
|
9478
|
+
allowed?: string[]
|
|
9479
|
+
}]
|
|
9444
9480
|
// ----- max-classes-per-file -----
|
|
9445
9481
|
type MaxClassesPerFile = []|[(number | {
|
|
9446
9482
|
ignoreExpressions?: boolean
|
|
@@ -11107,6 +11143,7 @@ type StyleIndent = []|[("tab" | number)]|[("tab" | number), {
|
|
|
11107
11143
|
offsetTernaryExpressions?: boolean
|
|
11108
11144
|
ignoredNodes?: string[]
|
|
11109
11145
|
ignoreComments?: boolean
|
|
11146
|
+
tabLength?: number
|
|
11110
11147
|
}]
|
|
11111
11148
|
// ----- style/indent-binary-ops -----
|
|
11112
11149
|
type StyleIndentBinaryOps = []|[(number | "tab")]
|
|
@@ -11481,6 +11518,10 @@ type StyleKeywordSpacing = []|[{
|
|
|
11481
11518
|
before?: boolean
|
|
11482
11519
|
after?: boolean
|
|
11483
11520
|
}
|
|
11521
|
+
satisfies?: {
|
|
11522
|
+
before?: boolean
|
|
11523
|
+
after?: boolean
|
|
11524
|
+
}
|
|
11484
11525
|
set?: {
|
|
11485
11526
|
before?: boolean
|
|
11486
11527
|
after?: boolean
|
|
@@ -11961,7 +12002,6 @@ type StyleTypeAnnotationSpacing = []|[{
|
|
|
11961
12002
|
parameter?: _StyleTypeAnnotationSpacing_SpacingConfig
|
|
11962
12003
|
property?: _StyleTypeAnnotationSpacing_SpacingConfig
|
|
11963
12004
|
returnType?: _StyleTypeAnnotationSpacing_SpacingConfig
|
|
11964
|
-
operator?: _StyleTypeAnnotationSpacing_SpacingConfig
|
|
11965
12005
|
}
|
|
11966
12006
|
}]
|
|
11967
12007
|
interface _StyleTypeAnnotationSpacing_SpacingConfig {
|
|
@@ -14170,6 +14210,10 @@ type VueKeywordSpacing = []|[{
|
|
|
14170
14210
|
before?: boolean
|
|
14171
14211
|
after?: boolean
|
|
14172
14212
|
}
|
|
14213
|
+
satisfies?: {
|
|
14214
|
+
before?: boolean
|
|
14215
|
+
after?: boolean
|
|
14216
|
+
}
|
|
14173
14217
|
set?: {
|
|
14174
14218
|
before?: boolean
|
|
14175
14219
|
after?: boolean
|
package/dist/index.d.ts
CHANGED
|
@@ -1444,6 +1444,34 @@ interface RuleOptions {
|
|
|
1444
1444
|
* @see https://eslint.org/docs/latest/rules/logical-assignment-operators
|
|
1445
1445
|
*/
|
|
1446
1446
|
'logical-assignment-operators'?: Linter.RuleEntry<LogicalAssignmentOperators>
|
|
1447
|
+
/**
|
|
1448
|
+
* Require languages for fenced code blocks.
|
|
1449
|
+
*/
|
|
1450
|
+
'markdown/fenced-code-language'?: Linter.RuleEntry<MarkdownFencedCodeLanguage>
|
|
1451
|
+
/**
|
|
1452
|
+
* Enforce heading levels increment by one.
|
|
1453
|
+
*/
|
|
1454
|
+
'markdown/heading-increment'?: Linter.RuleEntry<[]>
|
|
1455
|
+
/**
|
|
1456
|
+
* Disallow duplicate headings in the same document.
|
|
1457
|
+
*/
|
|
1458
|
+
'markdown/no-duplicate-headings'?: Linter.RuleEntry<[]>
|
|
1459
|
+
/**
|
|
1460
|
+
* Disallow empty links.
|
|
1461
|
+
*/
|
|
1462
|
+
'markdown/no-empty-links'?: Linter.RuleEntry<[]>
|
|
1463
|
+
/**
|
|
1464
|
+
* Disallow HTML tags.
|
|
1465
|
+
*/
|
|
1466
|
+
'markdown/no-html'?: Linter.RuleEntry<MarkdownNoHtml>
|
|
1467
|
+
/**
|
|
1468
|
+
* Disallow invalid label references.
|
|
1469
|
+
*/
|
|
1470
|
+
'markdown/no-invalid-label-refs'?: Linter.RuleEntry<[]>
|
|
1471
|
+
/**
|
|
1472
|
+
* Disallow missing label references.
|
|
1473
|
+
*/
|
|
1474
|
+
'markdown/no-missing-label-refs'?: Linter.RuleEntry<[]>
|
|
1447
1475
|
/**
|
|
1448
1476
|
* Enforce a maximum number of classes per file
|
|
1449
1477
|
* @see https://eslint.org/docs/latest/rules/max-classes-per-file
|
|
@@ -9441,6 +9469,14 @@ type LinesBetweenClassMembers = []|[({
|
|
|
9441
9469
|
type LogicalAssignmentOperators = (([]|["always"]|["always", {
|
|
9442
9470
|
enforceForIfStatements?: boolean
|
|
9443
9471
|
}] | ["never"]) & unknown[])
|
|
9472
|
+
// ----- markdown/fenced-code-language -----
|
|
9473
|
+
type MarkdownFencedCodeLanguage = []|[{
|
|
9474
|
+
required?: string[]
|
|
9475
|
+
}]
|
|
9476
|
+
// ----- markdown/no-html -----
|
|
9477
|
+
type MarkdownNoHtml = []|[{
|
|
9478
|
+
allowed?: string[]
|
|
9479
|
+
}]
|
|
9444
9480
|
// ----- max-classes-per-file -----
|
|
9445
9481
|
type MaxClassesPerFile = []|[(number | {
|
|
9446
9482
|
ignoreExpressions?: boolean
|
|
@@ -11107,6 +11143,7 @@ type StyleIndent = []|[("tab" | number)]|[("tab" | number), {
|
|
|
11107
11143
|
offsetTernaryExpressions?: boolean
|
|
11108
11144
|
ignoredNodes?: string[]
|
|
11109
11145
|
ignoreComments?: boolean
|
|
11146
|
+
tabLength?: number
|
|
11110
11147
|
}]
|
|
11111
11148
|
// ----- style/indent-binary-ops -----
|
|
11112
11149
|
type StyleIndentBinaryOps = []|[(number | "tab")]
|
|
@@ -11481,6 +11518,10 @@ type StyleKeywordSpacing = []|[{
|
|
|
11481
11518
|
before?: boolean
|
|
11482
11519
|
after?: boolean
|
|
11483
11520
|
}
|
|
11521
|
+
satisfies?: {
|
|
11522
|
+
before?: boolean
|
|
11523
|
+
after?: boolean
|
|
11524
|
+
}
|
|
11484
11525
|
set?: {
|
|
11485
11526
|
before?: boolean
|
|
11486
11527
|
after?: boolean
|
|
@@ -11961,7 +12002,6 @@ type StyleTypeAnnotationSpacing = []|[{
|
|
|
11961
12002
|
parameter?: _StyleTypeAnnotationSpacing_SpacingConfig
|
|
11962
12003
|
property?: _StyleTypeAnnotationSpacing_SpacingConfig
|
|
11963
12004
|
returnType?: _StyleTypeAnnotationSpacing_SpacingConfig
|
|
11964
|
-
operator?: _StyleTypeAnnotationSpacing_SpacingConfig
|
|
11965
12005
|
}
|
|
11966
12006
|
}]
|
|
11967
12007
|
interface _StyleTypeAnnotationSpacing_SpacingConfig {
|
|
@@ -14170,6 +14210,10 @@ type VueKeywordSpacing = []|[{
|
|
|
14170
14210
|
before?: boolean
|
|
14171
14211
|
after?: boolean
|
|
14172
14212
|
}
|
|
14213
|
+
satisfies?: {
|
|
14214
|
+
before?: boolean
|
|
14215
|
+
after?: boolean
|
|
14216
|
+
}
|
|
14173
14217
|
set?: {
|
|
14174
14218
|
before?: boolean
|
|
14175
14219
|
after?: boolean
|
package/dist/index.js
CHANGED
|
@@ -281,8 +281,7 @@ async function disables() {
|
|
|
281
281
|
name: "antfu/disables/scripts",
|
|
282
282
|
rules: {
|
|
283
283
|
"no-console": "off",
|
|
284
|
-
"ts/explicit-function-return-type": "off"
|
|
285
|
-
"unicorn/consistent-function-scoping": "off"
|
|
284
|
+
"ts/explicit-function-return-type": "off"
|
|
286
285
|
}
|
|
287
286
|
},
|
|
288
287
|
{
|
|
@@ -1048,7 +1047,7 @@ async function markdown(options = {}) {
|
|
|
1048
1047
|
files = [GLOB_MARKDOWN],
|
|
1049
1048
|
overrides = {}
|
|
1050
1049
|
} = options;
|
|
1051
|
-
const markdown2 = await interopDefault(import("eslint
|
|
1050
|
+
const markdown2 = await interopDefault(import("@eslint/markdown"));
|
|
1052
1051
|
return [
|
|
1053
1052
|
{
|
|
1054
1053
|
name: "antfu/markdown/setup",
|
|
@@ -1799,7 +1798,6 @@ async function test(options = {}) {
|
|
|
1799
1798
|
"test/prefer-hooks-in-order": "error",
|
|
1800
1799
|
"test/prefer-lowercase-title": "error",
|
|
1801
1800
|
"ts/explicit-function-return-type": "off",
|
|
1802
|
-
"unicorn/consistent-function-scoping": "off",
|
|
1803
1801
|
...overrides
|
|
1804
1802
|
}
|
|
1805
1803
|
}
|
|
@@ -2028,7 +2026,6 @@ async function unicorn(options = {}) {
|
|
|
2028
2026
|
rules: {
|
|
2029
2027
|
...options.allRecommended ? default6.configs["flat/recommended"].rules : {
|
|
2030
2028
|
"unicorn/consistent-empty-array-spread": "error",
|
|
2031
|
-
"unicorn/consistent-function-scoping": ["error", { checkArrowFunctions: false }],
|
|
2032
2029
|
"unicorn/error-message": "error",
|
|
2033
2030
|
"unicorn/escape-case": "error",
|
|
2034
2031
|
"unicorn/new-for-builtins": "error",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antfu/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.5.0",
|
|
5
5
|
"description": "Anthony's ESLint config",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -84,9 +84,10 @@
|
|
|
84
84
|
"@antfu/install-pkg": "^0.4.1",
|
|
85
85
|
"@clack/prompts": "^0.7.0",
|
|
86
86
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
87
|
-
"@
|
|
88
|
-
"@
|
|
89
|
-
"@typescript-eslint/
|
|
87
|
+
"@eslint/markdown": "^6.1.0",
|
|
88
|
+
"@stylistic/eslint-plugin": "^2.8.0",
|
|
89
|
+
"@typescript-eslint/eslint-plugin": "^8.5.0",
|
|
90
|
+
"@typescript-eslint/parser": "^8.5.0",
|
|
90
91
|
"@vitest/eslint-plugin": "^1.1.0",
|
|
91
92
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
92
93
|
"eslint-flat-config-utils": "^0.4.0",
|
|
@@ -96,7 +97,6 @@
|
|
|
96
97
|
"eslint-plugin-import-x": "^4.2.1",
|
|
97
98
|
"eslint-plugin-jsdoc": "^50.2.2",
|
|
98
99
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
99
|
-
"eslint-plugin-markdown": "^5.1.0",
|
|
100
100
|
"eslint-plugin-n": "^17.10.2",
|
|
101
101
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
102
102
|
"eslint-plugin-perfectionist": "^3.5.0",
|
|
@@ -119,10 +119,10 @@
|
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|
|
121
121
|
"@antfu/ni": "^0.23.0",
|
|
122
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
122
|
+
"@eslint-react/eslint-plugin": "^1.14.0",
|
|
123
123
|
"@eslint/config-inspector": "^0.5.4",
|
|
124
124
|
"@prettier/plugin-xml": "^3.4.1",
|
|
125
|
-
"@stylistic/eslint-plugin-migrate": "^2.
|
|
125
|
+
"@stylistic/eslint-plugin-migrate": "^2.8.0",
|
|
126
126
|
"@types/fs-extra": "^11.0.4",
|
|
127
127
|
"@types/node": "^22.5.4",
|
|
128
128
|
"@types/prompts": "^2.4.9",
|
|
@@ -152,14 +152,14 @@
|
|
|
152
152
|
"svelte-eslint-parser": "^0.41.0",
|
|
153
153
|
"tsup": "^8.2.4",
|
|
154
154
|
"tsx": "^4.19.0",
|
|
155
|
-
"typescript": "^5.
|
|
155
|
+
"typescript": "^5.6.2",
|
|
156
156
|
"vitest": "^2.0.5",
|
|
157
157
|
"vue": "^3.5.3",
|
|
158
|
-
"@antfu/eslint-config": "3.
|
|
158
|
+
"@antfu/eslint-config": "3.5.0"
|
|
159
159
|
},
|
|
160
160
|
"resolutions": {
|
|
161
161
|
"@eslint-community/eslint-utils": "^4.4.0",
|
|
162
|
-
"@typescript-eslint/utils": "^8.
|
|
162
|
+
"@typescript-eslint/utils": "^8.5.0",
|
|
163
163
|
"eslint": "^9.10.0",
|
|
164
164
|
"tsx": "^4.19.0"
|
|
165
165
|
},
|