@ntnyq/eslint-config 7.0.0-beta.13 → 7.0.0-beta.14

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.
Files changed (3) hide show
  1. package/dist/index.d.mts +180 -142
  2. package/dist/index.mjs +21 -15
  3. package/package.json +12 -13
package/dist/index.d.mts CHANGED
@@ -2491,6 +2491,16 @@ interface RuleOptions {
2491
2491
  * @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-identical-tests.md
2492
2492
  */
2493
2493
  'eslint-plugin/no-identical-tests'?: Linter.RuleEntry<[]>;
2494
+ /**
2495
+ * require explicit policy choices in rule options schemas
2496
+ * @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-incomplete-meta-schema.md
2497
+ */
2498
+ 'eslint-plugin/no-incomplete-meta-schema'?: Linter.RuleEntry<EslintPluginNoIncompleteMetaSchema>;
2499
+ /**
2500
+ * disallow rule options schema constructs that ESLint ignores
2501
+ * @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-incorrect-meta-schema.md
2502
+ */
2503
+ 'eslint-plugin/no-incorrect-meta-schema'?: Linter.RuleEntry<EslintPluginNoIncorrectMetaSchema>;
2494
2504
  /**
2495
2505
  * require suggestions to have different `messageId` than their parent report
2496
2506
  * @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-matching-violation-suggest-message-ids.md
@@ -5214,6 +5224,11 @@ interface RuleOptions {
5214
5224
  * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-enforce-settings.test.ts
5215
5225
  */
5216
5226
  'pnpm/yaml-enforce-settings'?: Linter.RuleEntry<PnpmYamlEnforceSettings>;
5227
+ /**
5228
+ * Disallow the anonymous `catalog:` in `pnpm-workspace.yaml` in favor of named catalogs
5229
+ * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-anonymous-catalog.test.ts
5230
+ */
5231
+ 'pnpm/yaml-no-anonymous-catalog'?: Linter.RuleEntry<[]>;
5217
5232
  /**
5218
5233
  * Disallow duplicate catalog items in `pnpm-workspace.yaml`
5219
5234
  * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-duplicate-catalog-item.test.ts
@@ -11343,10 +11358,34 @@ type Eqeqeq = ([] | ["always"] | ["always", {
11343
11358
  // ----- eslint-plugin/consistent-output -----
11344
11359
  type EslintPluginConsistentOutput = [] | [("always" | "consistent")];
11345
11360
  // ----- eslint-plugin/meta-property-ordering -----
11346
- type EslintPluginMetaPropertyOrdering = [] | [unknown[]];
11361
+ type EslintPluginMetaPropertyOrdering = [] | [string[]];
11362
+ // ----- eslint-plugin/no-incomplete-meta-schema -----
11363
+ type EslintPluginNoIncompleteMetaSchema = [] | [{
11364
+ checks?: {
11365
+ explicitAdditionalProperties?: boolean;
11366
+ explicitItems?: boolean;
11367
+ typedItems?: boolean;
11368
+ boundedTuples?: boolean;
11369
+ };
11370
+ }];
11371
+ // ----- eslint-plugin/no-incorrect-meta-schema -----
11372
+ type EslintPluginNoIncorrectMetaSchema = [] | [{
11373
+ checks?: {
11374
+ emptyRoot?: boolean;
11375
+ bareArrayRoot?: boolean;
11376
+ nonArrayRootType?: boolean;
11377
+ nonConstrainingRoot?: boolean;
11378
+ ignoredKeywords?: boolean;
11379
+ ignoredRefSiblings?: boolean;
11380
+ unresolvedRefs?: boolean;
11381
+ ignoredAdditionalItems?: boolean;
11382
+ incompatibleTypeKeywords?: boolean;
11383
+ impossibleBounds?: boolean;
11384
+ };
11385
+ }];
11347
11386
  // ----- eslint-plugin/no-property-in-node -----
11348
11387
  type EslintPluginNoPropertyInNode = [] | [{
11349
- additionalNodeTypeFiles?: unknown[];
11388
+ additionalNodeTypeFiles?: string[];
11350
11389
  }];
11351
11390
  // ----- eslint-plugin/report-message-format -----
11352
11391
  type EslintPluginReportMessageFormat = [] | [string];
@@ -11375,7 +11414,7 @@ type EslintPluginRequireTestCaseName = [] | [{
11375
11414
  require?: ("always" | "objects" | "objects-with-config");
11376
11415
  }];
11377
11416
  // ----- eslint-plugin/test-case-property-ordering -----
11378
- type EslintPluginTestCasePropertyOrdering = [] | [unknown[]];
11417
+ type EslintPluginTestCasePropertyOrdering = [] | [string[]];
11379
11418
  // ----- eslint-plugin/test-case-shorthand-strings -----
11380
11419
  type EslintPluginTestCaseShorthandStrings = [] | [("as-needed" | "never" | "consistent" | "consistent-as-needed")];
11381
11420
  // ----- func-call-spacing -----
@@ -17461,9 +17500,9 @@ type SvgoSvgo = [] | [{
17461
17500
  textStart?: string;
17462
17501
  useShortTags?: boolean;
17463
17502
  };
17464
- plugins?: (("preset-default" | "cleanupAttrs" | "cleanupEnableBackground" | "cleanupIds" | "cleanupNumericValues" | "collapseGroups" | "convertColors" | "convertEllipseToCircle" | "convertPathData" | "convertShapeToPath" | "convertTransform" | "inlineStyles" | "mergePaths" | "mergeStyles" | "minifyStyles" | "moveElemsAttrsToGroup" | "moveGroupAttrsToElems" | "removeComments" | "removeDeprecatedAttrs" | "removeDesc" | "removeDoctype" | "removeEditorsNSData" | "removeEmptyAttrs" | "removeEmptyContainers" | "removeEmptyText" | "removeHiddenElems" | "removeMetadata" | "removeNonInheritableGroupAttrs" | "removeUnknownsAndDefaults" | "removeUnusedNS" | "removeUselessDefs" | "removeUselessStrokeAndFill" | "removeXMLProcInst" | "sortAttrs" | "sortDefsChildren" | "cleanupListOfValues" | "convertOneStopGradients" | "convertStyleToAttrs" | "prefixIds" | "removeDimensions" | "removeOffCanvasPaths" | "removeRasterImages" | "removeScripts" | "removeStyleElement" | "removeTitle" | "removeViewBox" | "removeXlink" | "removeXMLNS" | "reusePaths" | "addAttributesToSVGElement" | "addClassesToSVGElement" | "removeAttributesBySelector" | "removeAttrs" | "removeElementsByAttr") | {
17503
+ plugins?: (("cleanupAttrs" | "cleanupEnableBackground" | "cleanupIds" | "cleanupListOfValues" | "cleanupNumericValues" | "collapseGroups" | "convertColors" | "convertEllipseToCircle" | "convertOneStopGradients" | "convertPathData" | "convertShapeToPath" | "convertStyleToAttrs" | "convertTransform" | "inlineStyles" | "mergePaths" | "mergeStyles" | "minifyStyles" | "moveElemsAttrsToGroup" | "moveGroupAttrsToElems" | "prefixIds" | "removeComments" | "removeDeprecatedAttrs" | "removeDesc" | "removeDimensions" | "removeDoctype" | "removeEditorsNSData" | "removeEmptyAttrs" | "removeEmptyContainers" | "removeEmptyText" | "removeHiddenElems" | "removeMetadata" | "removeNonInheritableGroupAttrs" | "removeOffCanvasPaths" | "removeRasterImages" | "removeScripts" | "removeStyleElement" | "removeTitle" | "removeUnknownsAndDefaults" | "removeUnusedNS" | "removeUselessDefs" | "removeUselessStrokeAndFill" | "removeViewBox" | "removeXlink" | "removeXMLNS" | "removeXMLProcInst" | "reusePaths" | "sortAttrs" | "sortDefsChildren" | "preset-default") | {
17465
17504
  name: "addAttributesToSVGElement";
17466
- params?: {
17505
+ params: {
17467
17506
  attribute?: (string | {
17468
17507
  [k: string]: (string | null);
17469
17508
  });
@@ -17473,7 +17512,7 @@ type SvgoSvgo = [] | [{
17473
17512
  };
17474
17513
  } | {
17475
17514
  name: "addClassesToSVGElement";
17476
- params?: {
17515
+ params: {
17477
17516
  className?: string;
17478
17517
  classNames?: string[];
17479
17518
  };
@@ -17621,6 +17660,140 @@ type SvgoSvgo = [] | [{
17621
17660
  prefixIds?: boolean;
17622
17661
  prefixClassNames?: boolean;
17623
17662
  };
17663
+ } | {
17664
+ name: "removeAttributesBySelector";
17665
+ params: {
17666
+ selectors?: {
17667
+ selector?: string;
17668
+ attributes?: string[];
17669
+ [k: string]: unknown | undefined;
17670
+ }[];
17671
+ };
17672
+ } | {
17673
+ name: "removeAttrs";
17674
+ params: {
17675
+ attrs?: (string | string[]);
17676
+ elemSeparator?: string;
17677
+ preserveCurrentColor?: boolean;
17678
+ };
17679
+ } | {
17680
+ name: "removeComments";
17681
+ params?: {
17682
+ preservePatterns?: (false | string[]);
17683
+ };
17684
+ } | {
17685
+ name: "removeDeprecatedAttrs";
17686
+ params?: {
17687
+ removeUnsafe?: boolean;
17688
+ };
17689
+ } | {
17690
+ name: "removeDesc";
17691
+ params?: {
17692
+ removeAny?: boolean;
17693
+ };
17694
+ } | {
17695
+ name: "removeDimensions";
17696
+ } | {
17697
+ name: "removeDoctype";
17698
+ } | {
17699
+ name: "removeEditorsNSData";
17700
+ params?: {
17701
+ additionalNamespaces?: string[];
17702
+ };
17703
+ } | {
17704
+ name: "removeElementsByAttr";
17705
+ params: {
17706
+ id?: (string | string[]);
17707
+ class?: (string | string[]);
17708
+ };
17709
+ } | {
17710
+ name: "removeEmptyAttrs";
17711
+ } | {
17712
+ name: "removeEmptyContainers";
17713
+ } | {
17714
+ name: "removeEmptyText";
17715
+ params?: {
17716
+ text?: boolean;
17717
+ tspan?: boolean;
17718
+ tref?: boolean;
17719
+ };
17720
+ } | {
17721
+ name: "removeHiddenElems";
17722
+ params?: {
17723
+ isHidden?: boolean;
17724
+ displayNone?: boolean;
17725
+ opacity0?: boolean;
17726
+ circleR0?: boolean;
17727
+ ellipseRX0?: boolean;
17728
+ ellipseRY0?: boolean;
17729
+ rectWidth0?: boolean;
17730
+ rectHeight0?: boolean;
17731
+ patternWidth0?: boolean;
17732
+ patternHeight0?: boolean;
17733
+ imageWidth0?: boolean;
17734
+ imageHeight0?: boolean;
17735
+ pathEmptyD?: boolean;
17736
+ polylineEmptyPoints?: boolean;
17737
+ polygonEmptyPoints?: boolean;
17738
+ };
17739
+ } | {
17740
+ name: "removeMetadata";
17741
+ } | {
17742
+ name: "removeNonInheritableGroupAttrs";
17743
+ } | {
17744
+ name: "removeOffCanvasPaths";
17745
+ } | {
17746
+ name: "removeRasterImages";
17747
+ } | {
17748
+ name: "removeScripts";
17749
+ } | {
17750
+ name: "removeStyleElement";
17751
+ } | {
17752
+ name: "removeTitle";
17753
+ } | {
17754
+ name: "removeUnknownsAndDefaults";
17755
+ params?: {
17756
+ unknownContent?: boolean;
17757
+ unknownAttrs?: boolean;
17758
+ defaultAttrs?: boolean;
17759
+ defaultMarkupDeclarations?: boolean;
17760
+ uselessOverrides?: boolean;
17761
+ keepDataAttrs?: boolean;
17762
+ keepAriaAttrs?: boolean;
17763
+ keepRoleAttr?: boolean;
17764
+ };
17765
+ } | {
17766
+ name: "removeUnusedNS";
17767
+ } | {
17768
+ name: "removeUselessDefs";
17769
+ } | {
17770
+ name: "removeUselessStrokeAndFill";
17771
+ params?: {
17772
+ stroke?: boolean;
17773
+ fill?: boolean;
17774
+ removeNone?: boolean;
17775
+ };
17776
+ } | {
17777
+ name: "removeViewBox";
17778
+ } | {
17779
+ name: "removeXlink";
17780
+ params?: {
17781
+ includeLegacy?: boolean;
17782
+ };
17783
+ } | {
17784
+ name: "removeXMLNS";
17785
+ } | {
17786
+ name: "removeXMLProcInst";
17787
+ } | {
17788
+ name: "reusePaths";
17789
+ } | {
17790
+ name: "sortAttrs";
17791
+ params?: {
17792
+ order?: string[];
17793
+ xmlnsOrder?: ("front" | "alphabetical");
17794
+ };
17795
+ } | {
17796
+ name: "sortDefsChildren";
17624
17797
  } | {
17625
17798
  name: "preset-default";
17626
17799
  params?: {
@@ -17760,7 +17933,6 @@ type SvgoSvgo = [] | [{
17760
17933
  });
17761
17934
  removeMetadata?: false;
17762
17935
  removeNonInheritableGroupAttrs?: false;
17763
- removeTitle?: false;
17764
17936
  removeUnknownsAndDefaults?: (boolean | {
17765
17937
  unknownContent?: boolean;
17766
17938
  unknownAttrs?: boolean;
@@ -17778,7 +17950,6 @@ type SvgoSvgo = [] | [{
17778
17950
  fill?: boolean;
17779
17951
  removeNone?: boolean;
17780
17952
  });
17781
- removeViewBox?: false;
17782
17953
  removeXMLProcInst?: false;
17783
17954
  sortAttrs?: (boolean | {
17784
17955
  order?: string[];
@@ -17787,142 +17958,9 @@ type SvgoSvgo = [] | [{
17787
17958
  sortDefsChildren?: false;
17788
17959
  };
17789
17960
  };
17790
- } | {
17791
- name: "removeAttributesBySelector";
17792
- params?: {
17793
- selectors?: {
17794
- selector?: string;
17795
- attributes?: string[];
17796
- [k: string]: unknown | undefined;
17797
- }[];
17798
- };
17799
- } | {
17800
- name: "removeAttrs";
17801
- params?: {
17802
- attrs?: (string | string[]);
17803
- elemSeparator?: string;
17804
- preserveCurrentColor?: boolean;
17805
- };
17806
- } | {
17807
- name: "removeComments";
17808
- params?: {
17809
- preservePatterns?: (false | string[]);
17810
- };
17811
- } | {
17812
- name: "removeDeprecatedAttrs";
17813
- params?: {
17814
- removeUnsafe?: boolean;
17815
- };
17816
- } | {
17817
- name: "removeDesc";
17818
- params?: {
17819
- removeAny?: boolean;
17820
- };
17821
- } | {
17822
- name: "removeDimensions";
17823
- } | {
17824
- name: "removeDoctype";
17825
- } | {
17826
- name: "removeEditorsNSData";
17827
- params?: {
17828
- additionalNamespaces?: string[];
17829
- };
17830
- } | {
17831
- name: "removeElementsByAttr";
17832
- params?: {
17833
- id?: (string | string[]);
17834
- class?: (string | string[]);
17835
- };
17836
- } | {
17837
- name: "removeEmptyAttrs";
17838
- } | {
17839
- name: "removeEmptyContainers";
17840
- } | {
17841
- name: "removeEmptyText";
17842
- params?: {
17843
- text?: boolean;
17844
- tspan?: boolean;
17845
- tref?: boolean;
17846
- };
17847
- } | {
17848
- name: "removeHiddenElems";
17849
- params?: {
17850
- isHidden?: boolean;
17851
- displayNone?: boolean;
17852
- opacity0?: boolean;
17853
- circleR0?: boolean;
17854
- ellipseRX0?: boolean;
17855
- ellipseRY0?: boolean;
17856
- rectWidth0?: boolean;
17857
- rectHeight0?: boolean;
17858
- patternWidth0?: boolean;
17859
- patternHeight0?: boolean;
17860
- imageWidth0?: boolean;
17861
- imageHeight0?: boolean;
17862
- pathEmptyD?: boolean;
17863
- polylineEmptyPoints?: boolean;
17864
- polygonEmptyPoints?: boolean;
17865
- };
17866
- } | {
17867
- name: "removeMetadata";
17868
- } | {
17869
- name: "removeNonInheritableGroupAttrs";
17870
- } | {
17871
- name: "removeOffCanvasPaths";
17872
- } | {
17873
- name: "removeRasterImages";
17874
- } | {
17875
- name: "removeScripts";
17876
- } | {
17877
- name: "removeStyleElement";
17878
- } | {
17879
- name: "removeTitle";
17880
- } | {
17881
- name: "removeUnknownsAndDefaults";
17882
- params?: {
17883
- unknownContent?: boolean;
17884
- unknownAttrs?: boolean;
17885
- defaultAttrs?: boolean;
17886
- defaultMarkupDeclarations?: boolean;
17887
- uselessOverrides?: boolean;
17888
- keepDataAttrs?: boolean;
17889
- keepAriaAttrs?: boolean;
17890
- keepRoleAttr?: boolean;
17891
- };
17892
- } | {
17893
- name: "removeUnusedNS";
17894
- } | {
17895
- name: "removeUselessDefs";
17896
- } | {
17897
- name: "removeUselessStrokeAndFill";
17898
- params?: {
17899
- stroke?: boolean;
17900
- fill?: boolean;
17901
- removeNone?: boolean;
17902
- };
17903
- } | {
17904
- name: "removeViewBox";
17905
- } | {
17906
- name: "removeXlink";
17907
- params?: {
17908
- includeLegacy?: boolean;
17909
- };
17910
- } | {
17911
- name: "removeXMLNS";
17912
- } | {
17913
- name: "removeXMLProcInst";
17914
- } | {
17915
- name: "reusePaths";
17916
- } | {
17917
- name: "sortAttrs";
17918
- params?: {
17919
- order?: string[];
17920
- xmlnsOrder?: ("front" | "alphabetical");
17921
- };
17922
- } | {
17923
- name: "sortDefsChildren";
17924
17961
  })[];
17925
17962
  svgoConfig?: (boolean | string);
17963
+ reportMode?: ("diff" | "summary");
17926
17964
  }];
17927
17965
  // ----- switch-colon-spacing -----
17928
17966
  type SwitchColonSpacing = [] | [{
package/dist/index.mjs CHANGED
@@ -342,7 +342,7 @@ const unCategorizedRules = {
342
342
  * @returns ESLint configs
343
343
  */
344
344
  const configVue = (options = {}) => {
345
- const { files = [GLOB_VUE], ecmaVersion = "latest", extraFileExtensions = [] } = options;
345
+ const { files = [GLOB_VUE], ecmaVersion = "latest", extraFileExtensions = [], typescript = false } = options;
346
346
  const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
347
347
  function getVueProcessor() {
348
348
  const processorVueSFC = pluginVue.processors[".vue"];
@@ -358,7 +358,7 @@ const configVue = (options = {}) => {
358
358
  return [{
359
359
  name: "ntnyq/vue/setup",
360
360
  plugins: {
361
- "@typescript-eslint": pluginTypeScript,
361
+ ...typescript ? { "@typescript-eslint": pluginTypeScript } : {},
362
362
  vue: pluginVue
363
363
  }
364
364
  }, {
@@ -370,9 +370,9 @@ const configVue = (options = {}) => {
370
370
  parserOptions: {
371
371
  ecmaVersion,
372
372
  extraFileExtensions,
373
- parser: parserTypeScript,
374
373
  sourceType: "module",
375
- ecmaFeatures: { jsx: true }
374
+ ecmaFeatures: { jsx: true },
375
+ ...typescript ? { parser: parserTypeScript } : {}
376
376
  }
377
377
  },
378
378
  rules: {
@@ -1336,7 +1336,7 @@ const configAntfu = (options = {}) => [{
1336
1336
  const configAstro = async (options = {}) => {
1337
1337
  await ensurePackages(["astro-eslint-parser", "eslint-plugin-astro"]);
1338
1338
  const [parserAstro, pluginAstro] = await Promise.all([interopDefault(import("astro-eslint-parser")), interopDefault(import("eslint-plugin-astro"))]);
1339
- const { files = [GLOB_ASTRO], extraFileExtensions = [] } = options;
1339
+ const { files = [GLOB_ASTRO], ecmaVersion = "latest", extraFileExtensions = [], typescript = false } = options;
1340
1340
  return [{
1341
1341
  name: "ntnyq/astro",
1342
1342
  files,
@@ -1347,8 +1347,9 @@ const configAstro = async (options = {}) => {
1347
1347
  sourceType: "module",
1348
1348
  globals: { ...pluginAstro.environments.astro.globals },
1349
1349
  parserOptions: {
1350
+ ecmaVersion,
1350
1351
  extraFileExtensions,
1351
- parser: parserTypeScript
1352
+ ...typescript ? { parser: parserTypeScript } : {}
1352
1353
  }
1353
1354
  },
1354
1355
  rules: {
@@ -1644,7 +1645,7 @@ const configOxfmt = (options = {}) => {
1644
1645
  }, {
1645
1646
  name: "ntnyq/oxfmt/plain-parser-files",
1646
1647
  files: plainParserFiles,
1647
- ignores: nativeFiles.flat(),
1648
+ ignores: [...nativeFiles.flat(), ...ignoresWithoutParser],
1648
1649
  plugins: { oxfmt: pluginOxfmt },
1649
1650
  languageOptions: { parser: parserPlain },
1650
1651
  rules: {
@@ -1766,7 +1767,7 @@ const configRegexp = (options = {}) => {
1766
1767
  const configSvelte = async (options = {}) => {
1767
1768
  await ensurePackages(["svelte-eslint-parser", "eslint-plugin-svelte"]);
1768
1769
  const [parserSvelte, pluginSvelte] = await Promise.all([interopDefault(import("svelte-eslint-parser")), interopDefault(import("eslint-plugin-svelte"))]);
1769
- const { files = [GLOB_SVELTE], extraFileExtensions = [] } = options;
1770
+ const { files = [GLOB_SVELTE], ecmaVersion = "latest", extraFileExtensions = [], typescript = false } = options;
1770
1771
  return [{
1771
1772
  name: "ntnyq/svelte",
1772
1773
  files,
@@ -1776,8 +1777,9 @@ const configSvelte = async (options = {}) => {
1776
1777
  parser: parserSvelte,
1777
1778
  sourceType: "module",
1778
1779
  parserOptions: {
1780
+ ecmaVersion,
1779
1781
  extraFileExtensions,
1780
- parser: parserTypeScript
1782
+ ...typescript ? { parser: parserTypeScript } : {}
1781
1783
  }
1782
1784
  },
1783
1785
  rules: {
@@ -2601,9 +2603,11 @@ const configSpecials = (options = {}) => {
2601
2603
  * @returns ESLint configs
2602
2604
  */
2603
2605
  const configGitIgnore = (options = {}) => {
2604
- options.strict ??= false;
2605
2606
  return [{
2606
- ...createGitIgnoreConfig(options),
2607
+ ...createGitIgnoreConfig({
2608
+ ...options,
2609
+ strict: options.strict ?? false
2610
+ }),
2607
2611
  name: "ntnyq/gitignore"
2608
2612
  }];
2609
2613
  };
@@ -3275,7 +3279,7 @@ const configESLintComments = (options = {}) => [{
3275
3279
  * Config factory
3276
3280
  */
3277
3281
  function defineESLintConfig(options = {}, ...userConfigs) {
3278
- const { shareable = {}, ignores: userIgnores = [], vue: enableVue = hasVue(), pinia: enablePinia = hasPinia(), test: enableTest = hasVitest(), unocss: enableUnoCSS = hasUnoCSS(), typescript: enableTypeScript = hasTypeScript(), oxfmt: enableOxfmt = hasOxfmt(), prettier: enablePrettier = hasPrettier(), yml: enableYML = true, sort: enableSort = true, toml: enableTOML = true, jsonc: enableJSONC = true, antfu: enableAntfu = true, ntnyq: enableNtnyq = true, depend: enableDepend = true, regexp: enableRegexp = true, unicorn: enableUnicorn = true, deMorgan: enableDeMorgan = true, markdown: enableMarkdown = true, gitignore: enableGitIgnore = true, jsdoc: enableJsdoc = true, importX: enableImportX = true, specials: enableSpecials = true, githubAction: enableGitHubAction = true, perfectionist: enablePerfectionist = true, pnpm: enablePnpm = false, svgo: enableSVGO = false, html: enableHTML = false, astro: enableAstro = false, svelte: enableSvelte = false, eslintPlugin: enableESLintPlugin = false, unusedImports: enableUnusedImports = false } = options;
3282
+ const { shareable = {}, ignores: userIgnores = [], vue: enableVue = hasVue(), pinia: enablePinia = hasPinia(), test: enableTest = hasVitest(), unocss: enableUnoCSS = hasUnoCSS(), typescript: enableTypeScript = shareable.typescript ?? hasTypeScript(), oxfmt: enableOxfmt = hasOxfmt(), prettier: enablePrettier = hasPrettier(), yml: enableYML = true, sort: enableSort = true, toml: enableTOML = true, jsonc: enableJSONC = true, antfu: enableAntfu = true, ntnyq: enableNtnyq = true, depend: enableDepend = true, regexp: enableRegexp = true, unicorn: enableUnicorn = true, deMorgan: enableDeMorgan = true, markdown: enableMarkdown = true, gitignore: enableGitIgnore = true, jsdoc: enableJsdoc = true, importX: enableImportX = true, specials: enableSpecials = true, githubAction: enableGitHubAction = true, perfectionist: enablePerfectionist = true, pnpm: enablePnpm = false, svgo: enableSVGO = false, html: enableHTML = false, astro: enableAstro = false, svelte: enableSvelte = false, eslintPlugin: enableESLintPlugin = false, unusedImports: enableUnusedImports = false } = options;
3279
3283
  const configs = [];
3280
3284
  const { ecmaVersion = "latest", extraFileExtensions: shareableExtraFileExtensions = [] } = shareable;
3281
3285
  const extraFileExtensions = [...shareableExtraFileExtensions];
@@ -3324,8 +3328,8 @@ function defineESLintConfig(options = {}, ...userConfigs) {
3324
3328
  if (enableVue) configs.push(configVue({
3325
3329
  ecmaVersion,
3326
3330
  usingFormatter: !!usingFormatter,
3327
- ...resolveSubOptions(options, "vue"),
3328
3331
  typescript: !!enableTypeScript,
3332
+ ...resolveSubOptions(options, "vue"),
3329
3333
  overrides: getOverrides(options, "vue"),
3330
3334
  extraFileExtensions
3331
3335
  }));
@@ -3344,14 +3348,16 @@ function defineESLintConfig(options = {}, ...userConfigs) {
3344
3348
  overrides: getOverrides(options, "jsonc")
3345
3349
  }));
3346
3350
  if (enableAstro) configs.push(configAstro({
3347
- ...resolveSubOptions(options, "astro"),
3351
+ ecmaVersion,
3348
3352
  typescript: !!enableTypeScript,
3353
+ ...resolveSubOptions(options, "astro"),
3349
3354
  overrides: getOverrides(options, "astro"),
3350
3355
  extraFileExtensions
3351
3356
  }));
3352
3357
  if (enableSvelte) configs.push(configSvelte({
3353
- ...resolveSubOptions(options, "svelte"),
3358
+ ecmaVersion,
3354
3359
  typescript: !!enableTypeScript,
3360
+ ...resolveSubOptions(options, "svelte"),
3355
3361
  overrides: getOverrides(options, "svelte"),
3356
3362
  extraFileExtensions
3357
3363
  }));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "7.0.0-beta.13",
4
+ "version": "7.0.0-beta.14",
5
5
  "description": "An opinionated ESLint config preset of ntnyq",
6
6
  "keywords": [
7
7
  "eslint",
@@ -89,9 +89,9 @@
89
89
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
90
90
  "@eslint/js": "^10.0.1",
91
91
  "@eslint/markdown": "^8.0.3",
92
- "@ntnyq/utils": "^0.18.1",
92
+ "@ntnyq/utils": "^0.21.0",
93
93
  "@unocss/eslint-plugin": "^66.7.5",
94
- "@vitest/eslint-plugin": "^1.6.23",
94
+ "@vitest/eslint-plugin": "^1.6.24",
95
95
  "eslint-config-flat-gitignore": "^2.3.0",
96
96
  "eslint-flat-config-utils": "^3.2.0",
97
97
  "eslint-import-resolver-typescript": "^4.4.5",
@@ -103,23 +103,23 @@
103
103
  "eslint-plugin-depend": "^1.5.0",
104
104
  "eslint-plugin-github-action": "^0.3.0",
105
105
  "eslint-plugin-import-x": "^4.17.1",
106
- "eslint-plugin-jsdoc": "^63.2.0",
106
+ "eslint-plugin-jsdoc": "^63.3.1",
107
107
  "eslint-plugin-jsonc": "^3.3.0",
108
108
  "eslint-plugin-n": "^18.2.2",
109
109
  "eslint-plugin-no-only-tests": "^3.4.0",
110
110
  "eslint-plugin-ntnyq": "^0.14.0",
111
- "eslint-plugin-oxfmt": "^0.14.0",
111
+ "eslint-plugin-oxfmt": "^0.15.0",
112
112
  "eslint-plugin-perfectionist": "^5.10.0",
113
113
  "eslint-plugin-pinia": "^0.4.2",
114
114
  "eslint-plugin-prettier": "^5.5.6",
115
115
  "eslint-plugin-regexp": "^3.1.1",
116
- "eslint-plugin-svgo": "^0.12.0",
117
- "eslint-plugin-toml": "^1.4.0",
116
+ "eslint-plugin-svgo": "^0.13.0",
117
+ "eslint-plugin-toml": "^1.5.0",
118
118
  "eslint-plugin-unicorn": "^72.0.0",
119
119
  "eslint-plugin-vue": "^10.10.0",
120
120
  "eslint-plugin-yml": "^3.6.0",
121
121
  "eslint-processor-vue-blocks": "^2.0.0",
122
- "globals": "^17.7.0",
122
+ "globals": "^17.8.0",
123
123
  "jsonc-eslint-parser": "^3.1.0",
124
124
  "local-pkg": "^1.2.1",
125
125
  "toml-eslint-parser": "^1.0.3",
@@ -128,22 +128,21 @@
128
128
  "yaml-eslint-parser": "^2.1.0"
129
129
  },
130
130
  "devDependencies": {
131
- "@types/node": "^26.1.1",
131
+ "@types/node": "^26.1.2",
132
132
  "@typescript-eslint/types": "^8.65.0",
133
- "@typescript-eslint/utils": "^8.65.0",
134
133
  "@typescript/native-preview": "^7.0.0-dev.20260707.2",
135
134
  "bumpp": "^12.0.0",
136
135
  "consola": "^3.4.2",
137
- "eslint": "^10.7.0",
136
+ "eslint": "^10.8.0",
138
137
  "eslint-typegen": "^2.3.1",
139
138
  "husky": "^9.1.7",
140
139
  "jiti": "^2.7.0",
141
140
  "nano-staged": "^1.0.2",
142
141
  "npm-run-all2": "^9.0.2",
143
- "oxfmt": "^0.60.0",
142
+ "oxfmt": "^0.61.0",
144
143
  "prettier": "^3.9.6",
145
144
  "tinyglobby": "^0.2.17",
146
- "tsdown": "^0.22.13",
145
+ "tsdown": "^0.22.14",
147
146
  "tsx": "^4.23.1",
148
147
  "typescript": "^6.0.3",
149
148
  "uncase": "^0.2.0",