@antfu/eslint-config 4.16.1 → 4.17.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 +5 -5
- package/dist/index.d.ts +38 -4
- package/dist/index.js +2 -2
- package/package.json +23 -23
package/dist/cli.js
CHANGED
|
@@ -9,7 +9,7 @@ import parse from "parse-gitignore";
|
|
|
9
9
|
import { execSync } from "node:child_process";
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "4.
|
|
12
|
+
var version = "4.17.0";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/cli/constants.ts
|
|
@@ -176,16 +176,16 @@ async function updateEslintFiles(result) {
|
|
|
176
176
|
//#endregion
|
|
177
177
|
//#region src/cli/constants-generated.ts
|
|
178
178
|
const versionsMap = {
|
|
179
|
-
"@eslint-react/eslint-plugin": "^1.52.
|
|
180
|
-
"@unocss/eslint-plugin": "^66.
|
|
179
|
+
"@eslint-react/eslint-plugin": "^1.52.3",
|
|
180
|
+
"@unocss/eslint-plugin": "^66.3.3",
|
|
181
181
|
"astro-eslint-parser": "^1.2.2",
|
|
182
|
-
"eslint": "^9.
|
|
182
|
+
"eslint": "^9.31.0",
|
|
183
183
|
"eslint-plugin-astro": "^1.3.1",
|
|
184
184
|
"eslint-plugin-format": "^1.0.1",
|
|
185
185
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
186
186
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
187
187
|
"eslint-plugin-solid": "^0.14.5",
|
|
188
|
-
"eslint-plugin-svelte": "^3.
|
|
188
|
+
"eslint-plugin-svelte": "^3.10.1",
|
|
189
189
|
"prettier-plugin-astro": "^0.14.1",
|
|
190
190
|
"prettier-plugin-slidev": "^1.0.5",
|
|
191
191
|
"svelte-eslint-parser": "^1.2.0"
|
package/dist/index.d.ts
CHANGED
|
@@ -1286,7 +1286,7 @@ interface RuleOptions {
|
|
|
1286
1286
|
* Disallow empty definitions
|
|
1287
1287
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-definitions.md
|
|
1288
1288
|
*/
|
|
1289
|
-
'markdown/no-empty-definitions'?: Linter.RuleEntry<
|
|
1289
|
+
'markdown/no-empty-definitions'?: Linter.RuleEntry<MarkdownNoEmptyDefinitions>;
|
|
1290
1290
|
/**
|
|
1291
1291
|
* Disallow empty images
|
|
1292
1292
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-images.md
|
|
@@ -1332,6 +1332,11 @@ interface RuleOptions {
|
|
|
1332
1332
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reversed-media-syntax.md
|
|
1333
1333
|
*/
|
|
1334
1334
|
'markdown/no-reversed-media-syntax'?: Linter.RuleEntry<[]>;
|
|
1335
|
+
/**
|
|
1336
|
+
* Disallow unused definitions
|
|
1337
|
+
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-unused-definitions.md
|
|
1338
|
+
*/
|
|
1339
|
+
'markdown/no-unused-definitions'?: Linter.RuleEntry<MarkdownNoUnusedDefinitions>;
|
|
1335
1340
|
/**
|
|
1336
1341
|
* Require alternative text for images
|
|
1337
1342
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/require-alt-text.md
|
|
@@ -1504,7 +1509,7 @@ interface RuleOptions {
|
|
|
1504
1509
|
*/
|
|
1505
1510
|
'no-console'?: Linter.RuleEntry<NoConsole>;
|
|
1506
1511
|
/**
|
|
1507
|
-
* Disallow reassigning `const` variables
|
|
1512
|
+
* Disallow reassigning `const`, `using`, and `await using` variables
|
|
1508
1513
|
* @see https://eslint.org/docs/latest/rules/no-const-assign
|
|
1509
1514
|
*/
|
|
1510
1515
|
'no-const-assign'?: Linter.RuleEntry<[]>;
|
|
@@ -4884,6 +4889,16 @@ interface RuleOptions {
|
|
|
4884
4889
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
|
|
4885
4890
|
*/
|
|
4886
4891
|
'test/padding-around-test-blocks'?: Linter.RuleEntry<[]>;
|
|
4892
|
+
/**
|
|
4893
|
+
* enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`
|
|
4894
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md
|
|
4895
|
+
*/
|
|
4896
|
+
'test/prefer-called-once'?: Linter.RuleEntry<[]>;
|
|
4897
|
+
/**
|
|
4898
|
+
* enforce using `toBeCalledTimes(1)` or `toHaveBeenCalledTimes(1)`
|
|
4899
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-times.md
|
|
4900
|
+
*/
|
|
4901
|
+
'test/prefer-called-times'?: Linter.RuleEntry<[]>;
|
|
4887
4902
|
/**
|
|
4888
4903
|
* enforce using `toBeCalledWith()` or `toHaveBeenCalledWith()`
|
|
4889
4904
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md
|
|
@@ -5049,6 +5064,11 @@ interface RuleOptions {
|
|
|
5049
5064
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md
|
|
5050
5065
|
*/
|
|
5051
5066
|
'test/valid-title'?: Linter.RuleEntry<TestValidTitle>;
|
|
5067
|
+
/**
|
|
5068
|
+
* disallow `.todo` usage
|
|
5069
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/warn-todo.md
|
|
5070
|
+
*/
|
|
5071
|
+
'test/warn-todo'?: Linter.RuleEntry<[]>;
|
|
5052
5072
|
/**
|
|
5053
5073
|
* enforce linebreaks after opening and before closing array brackets
|
|
5054
5074
|
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/array-bracket-newline.html
|
|
@@ -7146,7 +7166,7 @@ interface RuleOptions {
|
|
|
7146
7166
|
*/
|
|
7147
7167
|
'vue/no-restricted-custom-event'?: Linter.RuleEntry<VueNoRestrictedCustomEvent>;
|
|
7148
7168
|
/**
|
|
7149
|
-
* disallow specific
|
|
7169
|
+
* disallow specific elements
|
|
7150
7170
|
* @see https://eslint.vuejs.org/rules/no-restricted-html-elements.html
|
|
7151
7171
|
*/
|
|
7152
7172
|
'vue/no-restricted-html-elements'?: Linter.RuleEntry<VueNoRestrictedHtmlElements>;
|
|
@@ -8472,6 +8492,7 @@ type JsdocMultilineBlocks = [] | [{
|
|
|
8472
8492
|
noMultilineBlocks?: boolean;
|
|
8473
8493
|
noSingleLineBlocks?: boolean;
|
|
8474
8494
|
noZeroLineText?: boolean;
|
|
8495
|
+
requireSingleLineUnderCount?: number;
|
|
8475
8496
|
singleLineTags?: string[];
|
|
8476
8497
|
}];
|
|
8477
8498
|
// ----- jsdoc/no-bad-blocks -----
|
|
@@ -9433,6 +9454,12 @@ type MarkdownNoDuplicateDefinitions = [] | [{
|
|
|
9433
9454
|
type MarkdownNoDuplicateHeadings = [] | [{
|
|
9434
9455
|
checkSiblingsOnly?: boolean;
|
|
9435
9456
|
}];
|
|
9457
|
+
// ----- markdown/no-empty-definitions -----
|
|
9458
|
+
type MarkdownNoEmptyDefinitions = [] | [{
|
|
9459
|
+
allowDefinitions?: string[];
|
|
9460
|
+
allowFootnoteDefinitions?: string[];
|
|
9461
|
+
checkFootnoteDefinitions?: boolean;
|
|
9462
|
+
}];
|
|
9436
9463
|
// ----- markdown/no-html -----
|
|
9437
9464
|
type MarkdownNoHtml = [] | [{
|
|
9438
9465
|
allowed?: string[];
|
|
@@ -9446,6 +9473,11 @@ type MarkdownNoMissingLinkFragments = [] | [{
|
|
|
9446
9473
|
type MarkdownNoMultipleH1 = [] | [{
|
|
9447
9474
|
frontmatterTitle?: string;
|
|
9448
9475
|
}];
|
|
9476
|
+
// ----- markdown/no-unused-definitions -----
|
|
9477
|
+
type MarkdownNoUnusedDefinitions = [] | [{
|
|
9478
|
+
allowDefinitions?: string[];
|
|
9479
|
+
allowFootnoteDefinitions?: string[];
|
|
9480
|
+
}];
|
|
9449
9481
|
// ----- max-classes-per-file -----
|
|
9450
9482
|
type MaxClassesPerFile = [] | [(number | {
|
|
9451
9483
|
ignoreExpressions?: boolean;
|
|
@@ -9609,6 +9641,7 @@ type NoConstantCondition = [] | [{
|
|
|
9609
9641
|
// ----- no-duplicate-imports -----
|
|
9610
9642
|
type NoDuplicateImports = [] | [{
|
|
9611
9643
|
includeExports?: boolean;
|
|
9644
|
+
allowSeparateTypeImports?: boolean;
|
|
9612
9645
|
}];
|
|
9613
9646
|
// ----- no-else-return -----
|
|
9614
9647
|
type NoElseReturn = [] | [{
|
|
@@ -14418,6 +14451,7 @@ interface _TsNamingConvention_MatchRegexConfig {
|
|
|
14418
14451
|
}
|
|
14419
14452
|
// ----- ts/no-base-to-string -----
|
|
14420
14453
|
type TsNoBaseToString = [] | [{
|
|
14454
|
+
checkUnknown?: boolean;
|
|
14421
14455
|
ignoredTypeNames?: string[];
|
|
14422
14456
|
}];
|
|
14423
14457
|
// ----- ts/no-confusing-void-expression -----
|
|
@@ -17220,7 +17254,7 @@ declare const GLOB_JSON5 = "**/*.json5";
|
|
|
17220
17254
|
declare const GLOB_JSONC = "**/*.jsonc";
|
|
17221
17255
|
declare const GLOB_MARKDOWN = "**/*.md";
|
|
17222
17256
|
declare const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
|
|
17223
|
-
declare const GLOB_SVELTE = "**/*.svelte";
|
|
17257
|
+
declare const GLOB_SVELTE = "**/*.svelte?(.{js,ts})";
|
|
17224
17258
|
declare const GLOB_VUE = "**/*.vue";
|
|
17225
17259
|
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
17226
17260
|
declare const GLOB_TOML = "**/*.toml";
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ const GLOB_JSON5 = "**/*.json5";
|
|
|
31
31
|
const GLOB_JSONC = "**/*.jsonc";
|
|
32
32
|
const GLOB_MARKDOWN = "**/*.md";
|
|
33
33
|
const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
|
|
34
|
-
const GLOB_SVELTE = "**/*.svelte";
|
|
34
|
+
const GLOB_SVELTE = "**/*.svelte?(.{js,ts})";
|
|
35
35
|
const GLOB_VUE = "**/*.vue";
|
|
36
36
|
const GLOB_YAML = "**/*.y?(a)ml";
|
|
37
37
|
const GLOB_TOML = "**/*.toml";
|
|
@@ -1406,7 +1406,7 @@ async function sortPackageJson() {
|
|
|
1406
1406
|
*/
|
|
1407
1407
|
function sortTsconfig() {
|
|
1408
1408
|
return [{
|
|
1409
|
-
files: ["**/
|
|
1409
|
+
files: ["**/[jt]sconfig.json", "**/[jt]sconfig.*.json"],
|
|
1410
1410
|
name: "antfu/sort/tsconfig-json",
|
|
1411
1411
|
rules: { "jsonc/sort-keys": [
|
|
1412
1412
|
"error",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antfu/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.17.0",
|
|
5
5
|
"description": "Anthony's ESLint config",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -92,11 +92,11 @@
|
|
|
92
92
|
"@antfu/install-pkg": "^1.1.0",
|
|
93
93
|
"@clack/prompts": "^0.11.0",
|
|
94
94
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
95
|
-
"@eslint/markdown": "^
|
|
96
|
-
"@stylistic/eslint-plugin": "^5.
|
|
97
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
98
|
-
"@typescript-eslint/parser": "^8.
|
|
99
|
-
"@vitest/eslint-plugin": "^1.
|
|
95
|
+
"@eslint/markdown": "^7.0.0",
|
|
96
|
+
"@stylistic/eslint-plugin": "^5.1.0",
|
|
97
|
+
"@typescript-eslint/eslint-plugin": "^8.37.0",
|
|
98
|
+
"@typescript-eslint/parser": "^8.37.0",
|
|
99
|
+
"@vitest/eslint-plugin": "^1.3.4",
|
|
100
100
|
"ansis": "^4.1.0",
|
|
101
101
|
"cac": "^6.7.14",
|
|
102
102
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
@@ -105,61 +105,61 @@
|
|
|
105
105
|
"eslint-plugin-antfu": "^3.1.1",
|
|
106
106
|
"eslint-plugin-command": "^3.3.1",
|
|
107
107
|
"eslint-plugin-import-lite": "^0.3.0",
|
|
108
|
-
"eslint-plugin-jsdoc": "^51.
|
|
108
|
+
"eslint-plugin-jsdoc": "^51.3.4",
|
|
109
109
|
"eslint-plugin-jsonc": "^2.20.1",
|
|
110
|
-
"eslint-plugin-n": "^17.
|
|
110
|
+
"eslint-plugin-n": "^17.21.0",
|
|
111
111
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
112
112
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
113
|
-
"eslint-plugin-pnpm": "^0.
|
|
113
|
+
"eslint-plugin-pnpm": "^1.0.0",
|
|
114
114
|
"eslint-plugin-regexp": "^2.9.0",
|
|
115
115
|
"eslint-plugin-toml": "^0.12.0",
|
|
116
116
|
"eslint-plugin-unicorn": "^59.0.1",
|
|
117
117
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
118
|
-
"eslint-plugin-vue": "^10.
|
|
118
|
+
"eslint-plugin-vue": "^10.3.0",
|
|
119
119
|
"eslint-plugin-yml": "^1.18.0",
|
|
120
120
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
121
|
-
"globals": "^16.
|
|
121
|
+
"globals": "^16.3.0",
|
|
122
122
|
"jsonc-eslint-parser": "^2.4.0",
|
|
123
123
|
"local-pkg": "^1.1.1",
|
|
124
124
|
"parse-gitignore": "^2.0.0",
|
|
125
125
|
"toml-eslint-parser": "^0.10.0",
|
|
126
|
-
"vue-eslint-parser": "^10.
|
|
126
|
+
"vue-eslint-parser": "^10.2.0",
|
|
127
127
|
"yaml-eslint-parser": "^1.3.0"
|
|
128
128
|
},
|
|
129
129
|
"devDependencies": {
|
|
130
130
|
"@antfu/ni": "^25.0.0",
|
|
131
|
-
"@eslint-react/eslint-plugin": "^1.52.
|
|
131
|
+
"@eslint-react/eslint-plugin": "^1.52.3",
|
|
132
132
|
"@eslint/config-inspector": "^1.1.0",
|
|
133
|
-
"@prettier/plugin-xml": "^3.4.
|
|
134
|
-
"@types/node": "^24.0.
|
|
135
|
-
"@unocss/eslint-plugin": "^66.
|
|
133
|
+
"@prettier/plugin-xml": "^3.4.2",
|
|
134
|
+
"@types/node": "^24.0.13",
|
|
135
|
+
"@unocss/eslint-plugin": "^66.3.3",
|
|
136
136
|
"astro-eslint-parser": "^1.2.2",
|
|
137
137
|
"bumpp": "^10.2.0",
|
|
138
|
-
"eslint": "^9.
|
|
138
|
+
"eslint": "^9.31.0",
|
|
139
139
|
"eslint-plugin-astro": "^1.3.1",
|
|
140
140
|
"eslint-plugin-format": "^1.0.1",
|
|
141
141
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
142
142
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
143
143
|
"eslint-plugin-solid": "^0.14.5",
|
|
144
|
-
"eslint-plugin-svelte": "^3.
|
|
144
|
+
"eslint-plugin-svelte": "^3.10.1",
|
|
145
145
|
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
146
|
-
"eslint-typegen": "^2.2.
|
|
146
|
+
"eslint-typegen": "^2.2.1",
|
|
147
147
|
"execa": "^9.6.0",
|
|
148
148
|
"jiti": "^2.4.2",
|
|
149
149
|
"lint-staged": "^16.1.2",
|
|
150
|
-
"pnpm-workspace-yaml": "^0.
|
|
150
|
+
"pnpm-workspace-yaml": "^1.0.0",
|
|
151
151
|
"prettier-plugin-astro": "^0.14.1",
|
|
152
152
|
"prettier-plugin-slidev": "^1.0.5",
|
|
153
153
|
"simple-git-hooks": "^2.13.0",
|
|
154
|
-
"svelte": "^5.
|
|
154
|
+
"svelte": "^5.36.0",
|
|
155
155
|
"svelte-eslint-parser": "^1.2.0",
|
|
156
156
|
"tinyglobby": "^0.2.14",
|
|
157
|
-
"tsdown": "^0.12.
|
|
157
|
+
"tsdown": "^0.12.9",
|
|
158
158
|
"tsx": "^4.20.3",
|
|
159
159
|
"typescript": "^5.8.3",
|
|
160
160
|
"vitest": "^3.2.4",
|
|
161
161
|
"vue": "^3.5.17",
|
|
162
|
-
"@antfu/eslint-config": "4.
|
|
162
|
+
"@antfu/eslint-config": "4.17.0"
|
|
163
163
|
},
|
|
164
164
|
"simple-git-hooks": {
|
|
165
165
|
"pre-commit": "npx lint-staged"
|