@antfu/eslint-config 4.15.0 → 4.16.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 +2 -2
- package/dist/index.d.ts +38 -12
- package/dist/index.js +5 -1
- package/package.json +8 -8
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.16.0";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/cli/constants.ts
|
|
@@ -185,7 +185,7 @@ const versionsMap = {
|
|
|
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.9.
|
|
188
|
+
"eslint-plugin-svelte": "^3.9.3",
|
|
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
|
@@ -1267,6 +1267,11 @@ interface RuleOptions {
|
|
|
1267
1267
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/heading-increment.md
|
|
1268
1268
|
*/
|
|
1269
1269
|
'markdown/heading-increment'?: Linter.RuleEntry<[]>;
|
|
1270
|
+
/**
|
|
1271
|
+
* Disallow bare URLs
|
|
1272
|
+
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-bare-urls.md
|
|
1273
|
+
*/
|
|
1274
|
+
'markdown/no-bare-urls'?: Linter.RuleEntry<[]>;
|
|
1270
1275
|
/**
|
|
1271
1276
|
* Disallow duplicate definitions
|
|
1272
1277
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-duplicate-definitions.md
|
|
@@ -1276,7 +1281,7 @@ interface RuleOptions {
|
|
|
1276
1281
|
* Disallow duplicate headings in the same document
|
|
1277
1282
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-duplicate-headings.md
|
|
1278
1283
|
*/
|
|
1279
|
-
'markdown/no-duplicate-headings'?: Linter.RuleEntry<
|
|
1284
|
+
'markdown/no-duplicate-headings'?: Linter.RuleEntry<MarkdownNoDuplicateHeadings>;
|
|
1280
1285
|
/**
|
|
1281
1286
|
* Disallow empty definitions
|
|
1282
1287
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-definitions.md
|
|
@@ -1312,11 +1317,21 @@ interface RuleOptions {
|
|
|
1312
1317
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-label-refs.md
|
|
1313
1318
|
*/
|
|
1314
1319
|
'markdown/no-missing-label-refs'?: Linter.RuleEntry<[]>;
|
|
1320
|
+
/**
|
|
1321
|
+
* Disallow link fragments that do not reference valid headings
|
|
1322
|
+
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-link-fragments.md
|
|
1323
|
+
*/
|
|
1324
|
+
'markdown/no-missing-link-fragments'?: Linter.RuleEntry<MarkdownNoMissingLinkFragments>;
|
|
1315
1325
|
/**
|
|
1316
1326
|
* Disallow multiple H1 headings in the same document
|
|
1317
1327
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-multiple-h1.md
|
|
1318
1328
|
*/
|
|
1319
1329
|
'markdown/no-multiple-h1'?: Linter.RuleEntry<MarkdownNoMultipleH1>;
|
|
1330
|
+
/**
|
|
1331
|
+
* Disallow reversed link and image syntax
|
|
1332
|
+
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reversed-media-syntax.md
|
|
1333
|
+
*/
|
|
1334
|
+
'markdown/no-reversed-media-syntax'?: Linter.RuleEntry<[]>;
|
|
1320
1335
|
/**
|
|
1321
1336
|
* Require alternative text for images
|
|
1322
1337
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/require-alt-text.md
|
|
@@ -8413,6 +8428,7 @@ type JsdocLinesBeforeBlock = [] | [{
|
|
|
8413
8428
|
checkBlockStarts?: boolean;
|
|
8414
8429
|
excludedTags?: string[];
|
|
8415
8430
|
ignoreSameLine?: boolean;
|
|
8431
|
+
ignoreSingleLines?: boolean;
|
|
8416
8432
|
lines?: number;
|
|
8417
8433
|
}];
|
|
8418
8434
|
// ----- jsdoc/match-description -----
|
|
@@ -9413,10 +9429,19 @@ type MarkdownNoDuplicateDefinitions = [] | [{
|
|
|
9413
9429
|
allowDefinitions?: string[];
|
|
9414
9430
|
allowFootnoteDefinitions?: string[];
|
|
9415
9431
|
}];
|
|
9432
|
+
// ----- markdown/no-duplicate-headings -----
|
|
9433
|
+
type MarkdownNoDuplicateHeadings = [] | [{
|
|
9434
|
+
checkSiblingsOnly?: boolean;
|
|
9435
|
+
}];
|
|
9416
9436
|
// ----- markdown/no-html -----
|
|
9417
9437
|
type MarkdownNoHtml = [] | [{
|
|
9418
9438
|
allowed?: string[];
|
|
9419
9439
|
}];
|
|
9440
|
+
// ----- markdown/no-missing-link-fragments -----
|
|
9441
|
+
type MarkdownNoMissingLinkFragments = [] | [{
|
|
9442
|
+
ignoreCase?: boolean;
|
|
9443
|
+
allowPattern?: string;
|
|
9444
|
+
}];
|
|
9420
9445
|
// ----- markdown/no-multiple-h1 -----
|
|
9421
9446
|
type MarkdownNoMultipleH1 = [] | [{
|
|
9422
9447
|
frontmatterTitle?: string;
|
|
@@ -12532,16 +12557,6 @@ type StyleCurlyNewline = [] | [(("always" | "never") | {
|
|
|
12532
12557
|
minElements?: number;
|
|
12533
12558
|
consistent?: boolean;
|
|
12534
12559
|
});
|
|
12535
|
-
TSEnumBody?: (("always" | "never") | {
|
|
12536
|
-
multiline?: boolean;
|
|
12537
|
-
minElements?: number;
|
|
12538
|
-
consistent?: boolean;
|
|
12539
|
-
});
|
|
12540
|
-
TSInterfaceBody?: (("always" | "never") | {
|
|
12541
|
-
multiline?: boolean;
|
|
12542
|
-
minElements?: number;
|
|
12543
|
-
consistent?: boolean;
|
|
12544
|
-
});
|
|
12545
12560
|
TSModuleBlock?: (("always" | "never") | {
|
|
12546
12561
|
multiline?: boolean;
|
|
12547
12562
|
minElements?: number;
|
|
@@ -12595,6 +12610,7 @@ type StyleIndent = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
12595
12610
|
var?: (number | ("first" | "off"));
|
|
12596
12611
|
let?: (number | ("first" | "off"));
|
|
12597
12612
|
const?: (number | ("first" | "off"));
|
|
12613
|
+
using?: (number | ("first" | "off"));
|
|
12598
12614
|
});
|
|
12599
12615
|
outerIIFEBody?: (number | "off");
|
|
12600
12616
|
MemberExpression?: (number | "off");
|
|
@@ -13075,6 +13091,10 @@ type StyleKeywordSpacing = [] | [{
|
|
|
13075
13091
|
before?: boolean;
|
|
13076
13092
|
after?: boolean;
|
|
13077
13093
|
};
|
|
13094
|
+
using?: {
|
|
13095
|
+
before?: boolean;
|
|
13096
|
+
after?: boolean;
|
|
13097
|
+
};
|
|
13078
13098
|
yield?: {
|
|
13079
13099
|
before?: boolean;
|
|
13080
13100
|
after?: boolean;
|
|
@@ -13359,6 +13379,11 @@ type StyleObjectCurlyNewline = [] | [((("always" | "never") | {
|
|
|
13359
13379
|
minProperties?: number;
|
|
13360
13380
|
consistent?: boolean;
|
|
13361
13381
|
});
|
|
13382
|
+
TSEnumBody?: (("always" | "never") | {
|
|
13383
|
+
multiline?: boolean;
|
|
13384
|
+
minProperties?: number;
|
|
13385
|
+
consistent?: boolean;
|
|
13386
|
+
});
|
|
13362
13387
|
})];
|
|
13363
13388
|
// ----- style/object-curly-spacing -----
|
|
13364
13389
|
type StyleObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
@@ -13391,7 +13416,7 @@ type StylePaddedBlocks = [] | [(("always" | "never" | "start" | "end") | {
|
|
|
13391
13416
|
}];
|
|
13392
13417
|
// ----- style/padding-line-between-statements -----
|
|
13393
13418
|
type _StylePaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always");
|
|
13394
|
-
type _StylePaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-export" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-export" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-export" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-export" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-export" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-export" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]]);
|
|
13419
|
+
type _StylePaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-export" | "multiline-let" | "multiline-using" | "multiline-var" | "singleline-const" | "singleline-export" | "singleline-let" | "singleline-using" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "using" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-export" | "multiline-let" | "multiline-using" | "multiline-var" | "singleline-const" | "singleline-export" | "singleline-let" | "singleline-using" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "using" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-export" | "multiline-let" | "multiline-using" | "multiline-var" | "singleline-const" | "singleline-export" | "singleline-let" | "singleline-using" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "using" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]]);
|
|
13395
13420
|
type StylePaddingLineBetweenStatements = {
|
|
13396
13421
|
blankLine: _StylePaddingLineBetweenStatementsPaddingType;
|
|
13397
13422
|
prev: _StylePaddingLineBetweenStatementsStatementType;
|
|
@@ -13430,6 +13455,7 @@ type StyleSpaceBeforeBlocks = [] | [(("always" | "never") | {
|
|
|
13430
13455
|
keywords?: ("always" | "never" | "off");
|
|
13431
13456
|
functions?: ("always" | "never" | "off");
|
|
13432
13457
|
classes?: ("always" | "never" | "off");
|
|
13458
|
+
modules?: ("always" | "never" | "off");
|
|
13433
13459
|
})];
|
|
13434
13460
|
// ----- style/space-before-function-paren -----
|
|
13435
13461
|
type StyleSpaceBeforeFunctionParen = [] | [(("always" | "never") | {
|
package/dist/index.js
CHANGED
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.16.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,8 +92,8 @@
|
|
|
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": "^6.
|
|
96
|
-
"@stylistic/eslint-plugin": "^5.0.0
|
|
95
|
+
"@eslint/markdown": "^6.6.0",
|
|
96
|
+
"@stylistic/eslint-plugin": "^5.0.0",
|
|
97
97
|
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
|
98
98
|
"@typescript-eslint/parser": "^8.34.1",
|
|
99
99
|
"@vitest/eslint-plugin": "^1.2.7",
|
|
@@ -103,9 +103,9 @@
|
|
|
103
103
|
"eslint-flat-config-utils": "^2.1.0",
|
|
104
104
|
"eslint-merge-processors": "^2.0.0",
|
|
105
105
|
"eslint-plugin-antfu": "^3.1.1",
|
|
106
|
-
"eslint-plugin-command": "^3.
|
|
106
|
+
"eslint-plugin-command": "^3.3.0",
|
|
107
107
|
"eslint-plugin-import-lite": "^0.3.0",
|
|
108
|
-
"eslint-plugin-jsdoc": "^51.
|
|
108
|
+
"eslint-plugin-jsdoc": "^51.2.1",
|
|
109
109
|
"eslint-plugin-jsonc": "^2.20.1",
|
|
110
110
|
"eslint-plugin-n": "^17.20.0",
|
|
111
111
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
@@ -141,7 +141,7 @@
|
|
|
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.9.
|
|
144
|
+
"eslint-plugin-svelte": "^3.9.3",
|
|
145
145
|
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
146
146
|
"eslint-typegen": "^2.2.0",
|
|
147
147
|
"execa": "^9.6.0",
|
|
@@ -151,7 +151,7 @@
|
|
|
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.34.
|
|
154
|
+
"svelte": "^5.34.7",
|
|
155
155
|
"svelte-eslint-parser": "^1.2.0",
|
|
156
156
|
"tinyglobby": "^0.2.14",
|
|
157
157
|
"tsdown": "^0.12.8",
|
|
@@ -159,7 +159,7 @@
|
|
|
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.16.0"
|
|
163
163
|
},
|
|
164
164
|
"simple-git-hooks": {
|
|
165
165
|
"pre-commit": "npx lint-staged"
|