@antfu/eslint-config 7.4.3 → 7.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/dist/cli.mjs 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 = "7.4.3";
12
+ var version = "7.5.0";
13
13
 
14
14
  //#endregion
15
15
  //#region src/cli/constants.ts
@@ -172,20 +172,20 @@ async function updateEslintFiles(result) {
172
172
  //#endregion
173
173
  //#region src/cli/constants-generated.ts
174
174
  const versionsMap = {
175
- "@eslint-react/eslint-plugin": "^2.12.4",
175
+ "@eslint-react/eslint-plugin": "^2.13.0",
176
176
  "@next/eslint-plugin-next": "^16.1.6",
177
177
  "@unocss/eslint-plugin": "^66.6.0",
178
- "astro-eslint-parser": "^1.2.2",
179
- "eslint": "^9.39.2",
180
- "eslint-plugin-astro": "^1.5.0",
181
- "eslint-plugin-format": "^1.4.0",
178
+ "astro-eslint-parser": "^1.3.0",
179
+ "eslint": "^10.0.2",
180
+ "eslint-plugin-astro": "^1.6.0",
181
+ "eslint-plugin-format": "^2.0.0",
182
182
  "eslint-plugin-react-hooks": "^7.0.1",
183
- "eslint-plugin-react-refresh": "^0.5.0",
183
+ "eslint-plugin-react-refresh": "^0.5.2",
184
184
  "eslint-plugin-solid": "^0.14.5",
185
185
  "eslint-plugin-svelte": "^3.15.0",
186
186
  "prettier-plugin-astro": "^0.14.1",
187
187
  "prettier-plugin-slidev": "^1.0.5",
188
- "svelte-eslint-parser": "^1.4.1"
188
+ "svelte-eslint-parser": "^1.5.0"
189
189
  };
190
190
 
191
191
  //#endregion
package/dist/index.d.mts CHANGED
@@ -1011,6 +1011,10 @@ interface RuleOptions {
1011
1011
  * Use dprint to format code
1012
1012
  */
1013
1013
  'format/dprint'?: Linter.RuleEntry<FormatDprint>;
1014
+ /**
1015
+ * Use oxfmt to format code
1016
+ */
1017
+ 'format/oxfmt'?: Linter.RuleEntry<FormatOxfmt>;
1014
1018
  /**
1015
1019
  * Use Prettier to format code
1016
1020
  */
@@ -3270,6 +3274,11 @@ interface RuleOptions {
3270
3274
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/console.md
3271
3275
  */
3272
3276
  'node/prefer-global/console'?: Linter.RuleEntry<NodePreferGlobalConsole>;
3277
+ /**
3278
+ * enforce either `crypto` or `require("crypto").webcrypto`
3279
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/crypto.md
3280
+ */
3281
+ 'node/prefer-global/crypto'?: Linter.RuleEntry<NodePreferGlobalCrypto>;
3273
3282
  /**
3274
3283
  * enforce either `process` or `require("process")`
3275
3284
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/process.md
@@ -3285,6 +3294,11 @@ interface RuleOptions {
3285
3294
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/text-encoder.md
3286
3295
  */
3287
3296
  'node/prefer-global/text-encoder'?: Linter.RuleEntry<NodePreferGlobalTextEncoder>;
3297
+ /**
3298
+ * enforce either global timer functions or `require("timers")`
3299
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/timers.md
3300
+ */
3301
+ 'node/prefer-global/timers'?: Linter.RuleEntry<NodePreferGlobalTimers>;
3288
3302
  /**
3289
3303
  * enforce either `URL` or `require("url").URL`
3290
3304
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url.md
@@ -3618,7 +3632,7 @@ interface RuleOptions {
3618
3632
  */
3619
3633
  'quotes'?: Linter.RuleEntry<Quotes>;
3620
3634
  /**
3621
- * Enforce the consistent use of the radix argument when using `parseInt()`
3635
+ * Enforce the use of the radix argument when using `parseInt()`
3622
3636
  * @see https://eslint.org/docs/latest/rules/radix
3623
3637
  */
3624
3638
  'radix'?: Linter.RuleEntry<Radix>;
@@ -3855,6 +3869,11 @@ interface RuleOptions {
3855
3869
  * @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension
3856
3870
  */
3857
3871
  'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>;
3872
+ /**
3873
+ * Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'.
3874
+ * @see https://eslint-react.xyz/docs/rules/naming-convention-id-name
3875
+ */
3876
+ 'react-naming-convention/id-name'?: Linter.RuleEntry<[]>;
3858
3877
  /**
3859
3878
  * Enforces identifier names assigned from 'useRef' calls to be either 'ref' or end with 'Ref'.
3860
3879
  * @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
@@ -3892,7 +3911,7 @@ interface RuleOptions {
3892
3911
  */
3893
3912
  'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>;
3894
3913
  /**
3895
- * Prevents unnecessary '$' symbols before JSX expressions.
3914
+ * Prevents unintentional '$' sign before expression.
3896
3915
  * @see https://eslint-react.xyz/docs/rules/jsx-dollar
3897
3916
  */
3898
3917
  'react/jsx-dollar'?: Linter.RuleEntry<[]>;
@@ -6169,11 +6188,21 @@ interface RuleOptions {
6169
6188
  * @see https://ota-meshi.github.io/eslint-plugin-toml/rules/indent.html
6170
6189
  */
6171
6190
  'toml/indent'?: Linter.RuleEntry<TomlIndent>;
6191
+ /**
6192
+ * enforce linebreaks after opening and before closing braces
6193
+ * @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-curly-newline.html
6194
+ */
6195
+ 'toml/inline-table-curly-newline'?: Linter.RuleEntry<TomlInlineTableCurlyNewline>;
6172
6196
  /**
6173
6197
  * enforce consistent spacing inside braces
6174
6198
  * @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-curly-spacing.html
6175
6199
  */
6176
6200
  'toml/inline-table-curly-spacing'?: Linter.RuleEntry<TomlInlineTableCurlySpacing>;
6201
+ /**
6202
+ * enforce placing inline table key-value pairs on separate lines
6203
+ * @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-key-value-newline.html
6204
+ */
6205
+ 'toml/inline-table-key-value-newline'?: Linter.RuleEntry<TomlInlineTableKeyValueNewline>;
6177
6206
  /**
6178
6207
  * enforce consistent spacing between keys and values in key/value pairs
6179
6208
  * @see https://ota-meshi.github.io/eslint-plugin-toml/rules/key-spacing.html
@@ -9001,7 +9030,7 @@ interface RuleOptions {
9001
9030
  * enforce valid `v-for` directives
9002
9031
  * @see https://eslint.vuejs.org/rules/valid-v-for.html
9003
9032
  */
9004
- 'vue/valid-v-for'?: Linter.RuleEntry<[]>;
9033
+ 'vue/valid-v-for'?: Linter.RuleEntry<VueValidVFor>;
9005
9034
  /**
9006
9035
  * enforce valid `v-html` directives
9007
9036
  * @see https://eslint.vuejs.org/rules/valid-v-html.html
@@ -9815,6 +9844,10 @@ type FormatDprint = [] | [{
9815
9844
  plugins?: unknown[];
9816
9845
  [k: string]: unknown | undefined;
9817
9846
  }];
9847
+ // ----- format/oxfmt -----
9848
+ type FormatOxfmt = [] | [{
9849
+ [k: string]: unknown | undefined;
9850
+ }];
9818
9851
  // ----- format/prettier -----
9819
9852
  type FormatPrettier = [] | [{
9820
9853
  parser: string;
@@ -10469,6 +10502,7 @@ type JsdocTagLines = [] | [("always" | "any" | "never")] | [("always" | "any" |
10469
10502
  endLines?: (number | null);
10470
10503
  maxBlockLines?: (number | null);
10471
10504
  startLines?: (number | null);
10505
+ startLinesWithNoTags?: number;
10472
10506
  tags?: {
10473
10507
  [k: string]: {
10474
10508
  count?: number;
@@ -10697,6 +10731,7 @@ type JsoncObjectCurlyNewline = [] | [((("always" | "never") | {
10697
10731
  type JsoncObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
10698
10732
  arraysInObjects?: boolean;
10699
10733
  objectsInObjects?: boolean;
10734
+ emptyObjects?: ("ignore" | "always" | "never");
10700
10735
  }];
10701
10736
  // ----- jsonc/object-property-newline -----
10702
10737
  type JsoncObjectPropertyNewline = [] | [{
@@ -11544,6 +11579,7 @@ type MaxParams = [] | [(number | {
11544
11579
  maximum?: number;
11545
11580
  max?: number;
11546
11581
  countVoidThis?: boolean;
11582
+ countThis?: ("never" | "except-void" | "always");
11547
11583
  })];
11548
11584
  // ----- max-statements -----
11549
11585
  type MaxStatements = [] | [(number | {
@@ -12202,12 +12238,16 @@ type NodeNoUnsupportedFeaturesNodeBuiltins = [] | [{
12202
12238
  type NodePreferGlobalBuffer = [] | [("always" | "never")];
12203
12239
  // ----- node/prefer-global/console -----
12204
12240
  type NodePreferGlobalConsole = [] | [("always" | "never")];
12241
+ // ----- node/prefer-global/crypto -----
12242
+ type NodePreferGlobalCrypto = [] | [("always" | "never")];
12205
12243
  // ----- node/prefer-global/process -----
12206
12244
  type NodePreferGlobalProcess = [] | [("always" | "never")];
12207
12245
  // ----- node/prefer-global/text-decoder -----
12208
12246
  type NodePreferGlobalTextDecoder = [] | [("always" | "never")];
12209
12247
  // ----- node/prefer-global/text-encoder -----
12210
12248
  type NodePreferGlobalTextEncoder = [] | [("always" | "never")];
12249
+ // ----- node/prefer-global/timers -----
12250
+ type NodePreferGlobalTimers = [] | [("always" | "never")];
12211
12251
  // ----- node/prefer-global/url -----
12212
12252
  type NodePreferGlobalUrl = [] | [("always" | "never")];
12213
12253
  // ----- node/prefer-global/url-search-params -----
@@ -16415,13 +16455,17 @@ type StylePaddedBlocks = [] | [(("always" | "never" | "start" | "end") | {
16415
16455
  }];
16416
16456
  // ----- style/padding-line-between-statements -----
16417
16457
  type _StylePaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always");
16418
- type _StylePaddingLineBetweenStatementsStatementOption = (_StylePaddingLineBetweenStatementsStatementType | [_StylePaddingLineBetweenStatementsStatementType, ...(_StylePaddingLineBetweenStatementsStatementType)[]]);
16458
+ type _StylePaddingLineBetweenStatementsStatementOption = (_StylePaddingLineBetweenStatementsStatementMatcher | [_StylePaddingLineBetweenStatementsStatementMatcher, ...(_StylePaddingLineBetweenStatementsStatementMatcher)[]]);
16459
+ type _StylePaddingLineBetweenStatementsStatementMatcher = (_StylePaddingLineBetweenStatementsStatementType | _StylePaddingLineBetweenStatements_SelectorOption);
16419
16460
  type _StylePaddingLineBetweenStatementsStatementType = ("*" | "exports" | "require" | "directive" | "iife" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "continue" | "debugger" | "default" | "do" | "for" | "if" | "import" | "switch" | "throw" | "try" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "function-overload" | "block-like" | "singleline-block-like" | "multiline-block-like" | "expression" | "singleline-expression" | "multiline-expression" | "return" | "singleline-return" | "multiline-return" | "export" | "singleline-export" | "multiline-export" | "var" | "singleline-var" | "multiline-var" | "let" | "singleline-let" | "multiline-let" | "const" | "singleline-const" | "multiline-const" | "using" | "singleline-using" | "multiline-using" | "type" | "singleline-type" | "multiline-type");
16420
16461
  type StylePaddingLineBetweenStatements = {
16421
16462
  blankLine: _StylePaddingLineBetweenStatementsPaddingType;
16422
16463
  prev: _StylePaddingLineBetweenStatementsStatementOption;
16423
16464
  next: _StylePaddingLineBetweenStatementsStatementOption;
16424
16465
  }[];
16466
+ interface _StylePaddingLineBetweenStatements_SelectorOption {
16467
+ selector: string;
16468
+ }
16425
16469
  // ----- style/quote-props -----
16426
16470
  type StyleQuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
16427
16471
  keywords?: boolean;
@@ -16889,10 +16933,21 @@ type TomlIndent = [] | [("tab" | number)] | [("tab" | number), {
16889
16933
  subTables?: number;
16890
16934
  keyValuePairs?: number;
16891
16935
  }];
16936
+ // ----- toml/inline-table-curly-newline -----
16937
+ type TomlInlineTableCurlyNewline = [] | [(("always" | "never") | {
16938
+ multiline?: boolean;
16939
+ minProperties?: number;
16940
+ consistent?: boolean;
16941
+ })];
16892
16942
  // ----- toml/inline-table-curly-spacing -----
16893
16943
  type TomlInlineTableCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
16894
16944
  arraysInObjects?: boolean;
16895
16945
  objectsInObjects?: boolean;
16946
+ emptyObjects?: ("ignore" | "always" | "never");
16947
+ }];
16948
+ // ----- toml/inline-table-key-value-newline -----
16949
+ type TomlInlineTableKeyValueNewline = [] | [{
16950
+ allowAllPropertiesOnSameLine?: boolean;
16896
16951
  }];
16897
16952
  // ----- toml/key-spacing -----
16898
16953
  type TomlKeySpacing = [] | [({
@@ -18337,6 +18392,7 @@ type VueAttributesOrder = [] | [{
18337
18392
  order?: (("DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT") | ("DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT")[])[];
18338
18393
  alphabetical?: boolean;
18339
18394
  sortLineLength?: boolean;
18395
+ ignoreVBindObject?: boolean;
18340
18396
  }];
18341
18397
  // ----- vue/block-lang -----
18342
18398
  type VueBlockLang = [] | [{
@@ -18428,7 +18484,7 @@ type VueDefineMacrosOrder = [] | [{
18428
18484
  type VueDefinePropsDeclaration = [] | [("type-based" | "runtime")];
18429
18485
  // ----- vue/define-props-destructuring -----
18430
18486
  type VueDefinePropsDestructuring = [] | [{
18431
- destructure?: ("always" | "never");
18487
+ destructure?: ("only-when-assigned" | "always" | "never");
18432
18488
  }];
18433
18489
  // ----- vue/dot-location -----
18434
18490
  type VueDotLocation = [] | [("object" | "property")];
@@ -19481,6 +19537,10 @@ type VueVSlotStyle = [] | [(("shorthand" | "longform") | {
19481
19537
  default?: ("shorthand" | "longform" | "v-slot");
19482
19538
  named?: ("shorthand" | "longform");
19483
19539
  })];
19540
+ // ----- vue/valid-v-for -----
19541
+ type VueValidVFor = [] | [{
19542
+ allowEmptyAlias?: boolean;
19543
+ }];
19484
19544
  // ----- vue/valid-v-on -----
19485
19545
  type VueValidVOn = [] | [{
19486
19546
  modifiers?: unknown[];
@@ -19527,6 +19587,7 @@ type YamlFlowMappingCurlyNewline = [] | [(("always" | "never") | {
19527
19587
  type YamlFlowMappingCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
19528
19588
  arraysInObjects?: boolean;
19529
19589
  objectsInObjects?: boolean;
19590
+ emptyObjects?: ("ignore" | "always" | "never");
19530
19591
  }];
19531
19592
  // ----- yaml/flow-sequence-bracket-newline -----
19532
19593
  type YamlFlowSequenceBracketNewline = [] | [(("always" | "never" | "consistent") | {
@@ -19712,7 +19773,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
19712
19773
  onlyEquality?: boolean;
19713
19774
  }];
19714
19775
  // Names of all the configs
19715
- type ConfigNames = 'antfu/gitignore' | 'antfu/ignores' | 'antfu/javascript/setup' | 'antfu/javascript/rules' | 'antfu/eslint-comments/rules' | 'antfu/command/rules' | 'antfu/perfectionist/setup' | 'antfu/node/rules' | 'antfu/jsdoc/rules' | 'antfu/imports/rules' | 'antfu/unicorn/rules' | 'antfu/jsx/setup' | 'antfu/typescript/setup' | 'antfu/typescript/parser' | 'antfu/typescript/type-aware-parser' | 'antfu/typescript/rules' | 'antfu/typescript/rules-type-aware' | 'antfu/typescript/erasable-syntax-only' | 'antfu/stylistic/rules' | 'antfu/regexp/rules' | 'antfu/test/setup' | 'antfu/test/rules' | 'antfu/vue/setup' | 'antfu/vue/rules' | 'antfu/react/setup' | 'antfu/react/rules' | 'antfu/react/typescript' | 'antfu/react/type-aware-rules' | 'antfu/nextjs/setup' | 'antfu/nextjs/rules' | 'antfu/solid/setup' | 'antfu/solid/rules' | 'antfu/svelte/setup' | 'antfu/svelte/rules' | 'antfu/unocss' | 'antfu/astro/setup' | 'antfu/astro/rules' | 'antfu/angular/setup' | 'antfu/angular/rules/ts' | 'antfu/angular/rules/template' | 'antfu/jsonc/setup' | 'antfu/jsonc/rules' | 'antfu/sort/package-json' | 'antfu/sort/tsconfig-json' | 'antfu/pnpm/package-json' | 'antfu/pnpm/pnpm-workspace-yaml' | 'antfu/pnpm/pnpm-workspace-yaml-sort' | 'antfu/yaml/setup' | 'antfu/yaml/rules' | 'antfu/toml/setup' | 'antfu/toml/rules' | 'antfu/markdown/setup' | 'antfu/markdown/processor' | 'antfu/markdown/parser' | 'antfu/markdown/disables' | 'antfu/formatter/setup' | 'antfu/formatter/css' | 'antfu/formatter/scss' | 'antfu/formatter/less' | 'antfu/formatter/html' | 'antfu/formatter/xml' | 'antfu/formatter/svg' | 'antfu/formatter/markdown' | 'antfu/formatter/astro' | 'antfu/formatter/astro/disables' | 'antfu/formatter/graphql' | 'antfu/disables/scripts' | 'antfu/disables/cli' | 'antfu/disables/bin' | 'antfu/disables/dts' | 'antfu/disables/cjs' | 'antfu/disables/config-files';
19776
+ type ConfigNames = 'antfu/gitignore' | 'antfu/ignores' | 'antfu/javascript/setup' | 'antfu/javascript/rules' | 'antfu/eslint-comments/rules' | 'antfu/command/rules' | 'antfu/perfectionist/setup' | 'antfu/node/rules' | 'antfu/jsdoc/rules' | 'antfu/imports/rules' | 'antfu/unicorn/rules' | 'antfu/jsx/setup' | 'antfu/typescript/setup' | 'antfu/typescript/parser' | 'antfu/typescript/type-aware-parser' | 'antfu/typescript/rules' | 'antfu/typescript/rules-type-aware' | 'antfu/typescript/erasable-syntax-only' | 'antfu/stylistic/rules' | 'antfu/regexp/rules' | 'antfu/test/setup' | 'antfu/test/rules' | 'antfu/vue/setup' | 'antfu/vue/rules' | 'antfu/react/setup' | 'antfu/react/rules' | 'antfu/react/typescript' | 'antfu/react/type-aware-rules' | 'antfu/nextjs/setup' | 'antfu/nextjs/rules' | 'antfu/solid/setup' | 'antfu/solid/rules' | 'antfu/svelte/setup' | 'antfu/svelte/rules' | 'antfu/unocss' | 'antfu/astro/setup' | 'antfu/astro/rules' | 'antfu/angular/setup' | 'antfu/angular/rules/ts' | 'antfu/angular/rules/template' | 'antfu/jsonc/setup' | 'antfu/jsonc/rules' | 'antfu/sort/package-json' | 'antfu/sort/tsconfig-json' | 'antfu/pnpm/package-json' | 'antfu/pnpm/pnpm-workspace-yaml' | 'antfu/pnpm/pnpm-workspace-yaml-sort' | 'antfu/yaml/setup' | 'antfu/yaml/rules' | 'antfu/toml/setup' | 'antfu/toml/rules' | 'antfu/markdown/setup' | 'antfu/markdown/processor' | 'antfu/markdown/parser' | 'antfu/markdown/rules' | 'antfu/markdown/disables/markdown' | 'antfu/markdown/disables/code' | 'antfu/formatter/setup' | 'antfu/formatter/css' | 'antfu/formatter/scss' | 'antfu/formatter/less' | 'antfu/formatter/html' | 'antfu/formatter/xml' | 'antfu/formatter/svg' | 'antfu/formatter/markdown' | 'antfu/formatter/astro' | 'antfu/formatter/astro/disables' | 'antfu/formatter/graphql' | 'antfu/disables/scripts' | 'antfu/disables/cli' | 'antfu/disables/bin' | 'antfu/disables/dts' | 'antfu/disables/cjs' | 'antfu/disables/config-files';
19716
19777
  //#endregion
19717
19778
  //#region src/vender/prettier-types.d.ts
19718
19779
  /**
@@ -19979,6 +20040,18 @@ interface OptionsUnicorn extends OptionsOverrides {
19979
20040
  */
19980
20041
  allRecommended?: boolean;
19981
20042
  }
20043
+ interface OptionsMarkdown extends OptionsOverrides {
20044
+ /**
20045
+ * Enable GFM (GitHub Flavored Markdown) support.
20046
+ *
20047
+ * @default true
20048
+ */
20049
+ gfm?: boolean;
20050
+ /**
20051
+ * Override rules for markdown itself.
20052
+ */
20053
+ overridesMarkdown?: TypedFlatConfigItem['rules'];
20054
+ }
19982
20055
  interface OptionsTypeScriptParserOptions {
19983
20056
  /**
19984
20057
  * Additional parser options for TypeScript.
@@ -20210,13 +20283,13 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
20210
20283
  */
20211
20284
  angular?: boolean | OptionsOverrides;
20212
20285
  /**
20213
- * Enable linting for **code snippets** in Markdown.
20286
+ * Enable linting for **code snippets** in Markdown and the markdown content itself.
20214
20287
  *
20215
20288
  * For formatting Markdown content, enable also `formatters.markdown`.
20216
20289
  *
20217
20290
  * @default true
20218
20291
  */
20219
- markdown?: boolean | OptionsOverrides;
20292
+ markdown?: boolean | OptionsMarkdown;
20220
20293
  /**
20221
20294
  * Enable stylistic rules.
20222
20295
  *
@@ -20401,7 +20474,7 @@ declare function jsonc(options?: OptionsFiles & OptionsStylistic & OptionsOverri
20401
20474
  declare function jsx(options?: OptionsJSX): Promise<TypedFlatConfigItem[]>;
20402
20475
  //#endregion
20403
20476
  //#region src/configs/markdown.d.ts
20404
- declare function markdown(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
20477
+ declare function markdown(options?: OptionsFiles & OptionsComponentExts & OptionsMarkdown): Promise<TypedFlatConfigItem[]>;
20405
20478
  //#endregion
20406
20479
  //#region src/configs/nextjs.d.ts
20407
20480
  declare function nextjs(options?: OptionsOverrides & OptionsFiles): Promise<TypedFlatConfigItem[]>;
@@ -20579,4 +20652,4 @@ declare function ensurePackages(packages: (string | undefined)[]): Promise<void>
20579
20652
  declare function isInEditorEnv(): boolean;
20580
20653
  declare function isInGitHooksOrLintStaged(): boolean;
20581
20654
  //#endregion
20582
- export { Awaitable, CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, type RuleOptions, Rules, StylisticConfig, StylisticConfigDefaults, StylisticOptions, TypedFlatConfigItem, angular, antfu, antfu as default, astro, combine, command, comments, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
20655
+ export { Awaitable, CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsMarkdown, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, type RuleOptions, Rules, StylisticConfig, StylisticConfigDefaults, StylisticOptions, TypedFlatConfigItem, angular, antfu, antfu as default, astro, combine, command, comments, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
package/dist/index.mjs CHANGED
@@ -1047,7 +1047,7 @@ async function jsx(options = {}) {
1047
1047
  //#endregion
1048
1048
  //#region src/configs/markdown.ts
1049
1049
  async function markdown(options = {}) {
1050
- const { componentExts = [], files = [GLOB_MARKDOWN], overrides = {} } = options;
1050
+ const { componentExts = [], files = [GLOB_MARKDOWN], gfm = true, overrides = {}, overridesMarkdown = {} } = options;
1051
1051
  const markdown$1 = await interopDefault(import("@eslint/markdown"));
1052
1052
  return [
1053
1053
  {
@@ -1062,13 +1062,37 @@ async function markdown(options = {}) {
1062
1062
  },
1063
1063
  {
1064
1064
  files,
1065
- languageOptions: { parser: parserPlain },
1065
+ language: gfm ? "markdown/gfm" : "markdown/commonmark",
1066
1066
  name: "antfu/markdown/parser"
1067
1067
  },
1068
+ {
1069
+ files,
1070
+ name: "antfu/markdown/rules",
1071
+ rules: {
1072
+ ...markdown$1.configs.recommended.at(0)?.rules,
1073
+ "markdown/no-missing-label-refs": "off",
1074
+ ...overridesMarkdown
1075
+ }
1076
+ },
1077
+ {
1078
+ files,
1079
+ name: "antfu/markdown/disables/markdown",
1080
+ rules: {
1081
+ "command/command": "off",
1082
+ "no-irregular-whitespace": "off",
1083
+ "perfectionist/sort-exports": "off",
1084
+ "perfectionist/sort-imports": "off",
1085
+ "regexp/no-legacy-features": "off",
1086
+ "regexp/no-missing-g-flag": "off",
1087
+ "regexp/no-useless-dollar-replacements": "off",
1088
+ "regexp/no-useless-flag": "off",
1089
+ "style/indent": "off"
1090
+ }
1091
+ },
1068
1092
  {
1069
1093
  files: [GLOB_MARKDOWN_CODE, ...componentExts.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)],
1070
1094
  languageOptions: { parserOptions: { ecmaFeatures: { impliedStrict: true } } },
1071
- name: "antfu/markdown/disables",
1095
+ name: "antfu/markdown/disables/code",
1072
1096
  rules: {
1073
1097
  "antfu/no-top-level-await": "off",
1074
1098
  "no-alert": "off",
@@ -2119,7 +2143,7 @@ async function typescript(options = {}) {
2119
2143
  }] : [],
2120
2144
  ...erasableOnly ? [{
2121
2145
  name: "antfu/typescript/erasable-syntax-only",
2122
- plugins: { "erasable-syntax-only": await interopDefault(import("./lib-DRA-mDV0.mjs")) },
2146
+ plugins: { "erasable-syntax-only": await interopDefault(import("./lib-B1Rme4qD.mjs")) },
2123
2147
  rules: {
2124
2148
  "erasable-syntax-only/enums": "error",
2125
2149
  "erasable-syntax-only/import-aliases": "error",