@ntnyq/eslint-config 7.0.0-beta.12 → 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.
- package/dist/index.d.mts +208 -142
- package/dist/index.mjs +21 -15
- package/package.json +22 -23
package/dist/index.d.mts
CHANGED
|
@@ -1572,6 +1572,7 @@ interface RuleOptions {
|
|
|
1572
1572
|
/**
|
|
1573
1573
|
* Disallow specified modules when loaded by `import`
|
|
1574
1574
|
* @see https://typescript-eslint.io/rules/no-restricted-imports
|
|
1575
|
+
* @deprecated
|
|
1575
1576
|
*/
|
|
1576
1577
|
'@typescript-eslint/no-restricted-imports'?: Linter.RuleEntry<TypescriptEslintNoRestrictedImports>;
|
|
1577
1578
|
/**
|
|
@@ -2490,6 +2491,16 @@ interface RuleOptions {
|
|
|
2490
2491
|
* @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-identical-tests.md
|
|
2491
2492
|
*/
|
|
2492
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>;
|
|
2493
2504
|
/**
|
|
2494
2505
|
* require suggestions to have different `messageId` than their parent report
|
|
2495
2506
|
* @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-matching-violation-suggest-message-ids.md
|
|
@@ -2600,6 +2611,11 @@ interface RuleOptions {
|
|
|
2600
2611
|
* @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-has-suggestions.md
|
|
2601
2612
|
*/
|
|
2602
2613
|
'eslint-plugin/require-meta-has-suggestions'?: Linter.RuleEntry<[]>;
|
|
2614
|
+
/**
|
|
2615
|
+
* require rules to implement a `meta.languages` property
|
|
2616
|
+
* @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-languages.md
|
|
2617
|
+
*/
|
|
2618
|
+
'eslint-plugin/require-meta-languages'?: Linter.RuleEntry<[]>;
|
|
2603
2619
|
/**
|
|
2604
2620
|
* require rules to implement a `meta.schema` property
|
|
2605
2621
|
* @see https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-schema.md
|
|
@@ -3236,6 +3252,11 @@ interface RuleOptions {
|
|
|
3236
3252
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header
|
|
3237
3253
|
*/
|
|
3238
3254
|
'jsdoc/no-undefined-types'?: Linter.RuleEntry<JsdocNoUndefinedTypes>;
|
|
3255
|
+
/**
|
|
3256
|
+
* Normalizes labeled links in `@see` tags to a canonical `{@link}` form.
|
|
3257
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/normalize-see-links.md#repos-sticky-header
|
|
3258
|
+
*/
|
|
3259
|
+
'jsdoc/normalize-see-links'?: Linter.RuleEntry<JsdocNormalizeSeeLinks>;
|
|
3239
3260
|
/**
|
|
3240
3261
|
* Prefer `@import` tags to inline `import()` statements.
|
|
3241
3262
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/prefer-import-tag.md#repos-sticky-header
|
|
@@ -5203,6 +5224,11 @@ interface RuleOptions {
|
|
|
5203
5224
|
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-enforce-settings.test.ts
|
|
5204
5225
|
*/
|
|
5205
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<[]>;
|
|
5206
5232
|
/**
|
|
5207
5233
|
* Disallow duplicate catalog items in `pnpm-workspace.yaml`
|
|
5208
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
|
|
@@ -5936,6 +5962,16 @@ interface RuleOptions {
|
|
|
5936
5962
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-html-tags/
|
|
5937
5963
|
*/
|
|
5938
5964
|
'svelte/no-at-html-tags'?: Linter.RuleEntry<[]>;
|
|
5965
|
+
/**
|
|
5966
|
+
* disallow useless `bind:value` on `<input type="checkbox">` and `<input type="radio">`
|
|
5967
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-bind-value-on-checkable-inputs/
|
|
5968
|
+
*/
|
|
5969
|
+
'svelte/no-bind-value-on-checkable-inputs'?: Linter.RuleEntry<[]>;
|
|
5970
|
+
/**
|
|
5971
|
+
* disallow a `.svelte` component and a same-named runes module (e.g. `Foo.svelte` and `Foo.svelte.ts`) from coexisting
|
|
5972
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-conflicting-module-names/
|
|
5973
|
+
*/
|
|
5974
|
+
'svelte/no-conflicting-module-names'?: Linter.RuleEntry<[]>;
|
|
5939
5975
|
/**
|
|
5940
5976
|
* disallow DOM manipulating
|
|
5941
5977
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dom-manipulating/
|
|
@@ -11322,10 +11358,34 @@ type Eqeqeq = ([] | ["always"] | ["always", {
|
|
|
11322
11358
|
// ----- eslint-plugin/consistent-output -----
|
|
11323
11359
|
type EslintPluginConsistentOutput = [] | [("always" | "consistent")];
|
|
11324
11360
|
// ----- eslint-plugin/meta-property-ordering -----
|
|
11325
|
-
type EslintPluginMetaPropertyOrdering = [] | [
|
|
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
|
+
}];
|
|
11326
11386
|
// ----- eslint-plugin/no-property-in-node -----
|
|
11327
11387
|
type EslintPluginNoPropertyInNode = [] | [{
|
|
11328
|
-
additionalNodeTypeFiles?:
|
|
11388
|
+
additionalNodeTypeFiles?: string[];
|
|
11329
11389
|
}];
|
|
11330
11390
|
// ----- eslint-plugin/report-message-format -----
|
|
11331
11391
|
type EslintPluginReportMessageFormat = [] | [string];
|
|
@@ -11354,7 +11414,7 @@ type EslintPluginRequireTestCaseName = [] | [{
|
|
|
11354
11414
|
require?: ("always" | "objects" | "objects-with-config");
|
|
11355
11415
|
}];
|
|
11356
11416
|
// ----- eslint-plugin/test-case-property-ordering -----
|
|
11357
|
-
type EslintPluginTestCasePropertyOrdering = [] | [
|
|
11417
|
+
type EslintPluginTestCasePropertyOrdering = [] | [string[]];
|
|
11358
11418
|
// ----- eslint-plugin/test-case-shorthand-strings -----
|
|
11359
11419
|
type EslintPluginTestCaseShorthandStrings = [] | [("as-needed" | "never" | "consistent" | "consistent-as-needed")];
|
|
11360
11420
|
// ----- func-call-spacing -----
|
|
@@ -12030,6 +12090,12 @@ type JsdocNoUndefinedTypes = [] | [{
|
|
|
12030
12090
|
disableReporting?: boolean;
|
|
12031
12091
|
markVariablesAsUsed?: boolean;
|
|
12032
12092
|
}];
|
|
12093
|
+
// ----- jsdoc/normalize-see-links -----
|
|
12094
|
+
type JsdocNormalizeSeeLinks = [] | [{
|
|
12095
|
+
canonicalForm?: ("pipe" | "prefix");
|
|
12096
|
+
enableFixer?: boolean;
|
|
12097
|
+
wrapBareUrls?: boolean;
|
|
12098
|
+
}];
|
|
12033
12099
|
// ----- jsdoc/prefer-import-tag -----
|
|
12034
12100
|
type JsdocPreferImportTag = [] | [{
|
|
12035
12101
|
enableFixer?: boolean;
|
|
@@ -17434,9 +17500,9 @@ type SvgoSvgo = [] | [{
|
|
|
17434
17500
|
textStart?: string;
|
|
17435
17501
|
useShortTags?: boolean;
|
|
17436
17502
|
};
|
|
17437
|
-
plugins?: (("
|
|
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") | {
|
|
17438
17504
|
name: "addAttributesToSVGElement";
|
|
17439
|
-
params
|
|
17505
|
+
params: {
|
|
17440
17506
|
attribute?: (string | {
|
|
17441
17507
|
[k: string]: (string | null);
|
|
17442
17508
|
});
|
|
@@ -17446,7 +17512,7 @@ type SvgoSvgo = [] | [{
|
|
|
17446
17512
|
};
|
|
17447
17513
|
} | {
|
|
17448
17514
|
name: "addClassesToSVGElement";
|
|
17449
|
-
params
|
|
17515
|
+
params: {
|
|
17450
17516
|
className?: string;
|
|
17451
17517
|
classNames?: string[];
|
|
17452
17518
|
};
|
|
@@ -17594,6 +17660,140 @@ type SvgoSvgo = [] | [{
|
|
|
17594
17660
|
prefixIds?: boolean;
|
|
17595
17661
|
prefixClassNames?: boolean;
|
|
17596
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";
|
|
17597
17797
|
} | {
|
|
17598
17798
|
name: "preset-default";
|
|
17599
17799
|
params?: {
|
|
@@ -17733,7 +17933,6 @@ type SvgoSvgo = [] | [{
|
|
|
17733
17933
|
});
|
|
17734
17934
|
removeMetadata?: false;
|
|
17735
17935
|
removeNonInheritableGroupAttrs?: false;
|
|
17736
|
-
removeTitle?: false;
|
|
17737
17936
|
removeUnknownsAndDefaults?: (boolean | {
|
|
17738
17937
|
unknownContent?: boolean;
|
|
17739
17938
|
unknownAttrs?: boolean;
|
|
@@ -17751,7 +17950,6 @@ type SvgoSvgo = [] | [{
|
|
|
17751
17950
|
fill?: boolean;
|
|
17752
17951
|
removeNone?: boolean;
|
|
17753
17952
|
});
|
|
17754
|
-
removeViewBox?: false;
|
|
17755
17953
|
removeXMLProcInst?: false;
|
|
17756
17954
|
sortAttrs?: (boolean | {
|
|
17757
17955
|
order?: string[];
|
|
@@ -17760,142 +17958,9 @@ type SvgoSvgo = [] | [{
|
|
|
17760
17958
|
sortDefsChildren?: false;
|
|
17761
17959
|
};
|
|
17762
17960
|
};
|
|
17763
|
-
} | {
|
|
17764
|
-
name: "removeAttributesBySelector";
|
|
17765
|
-
params?: {
|
|
17766
|
-
selectors?: {
|
|
17767
|
-
selector?: string;
|
|
17768
|
-
attributes?: string[];
|
|
17769
|
-
[k: string]: unknown | undefined;
|
|
17770
|
-
}[];
|
|
17771
|
-
};
|
|
17772
|
-
} | {
|
|
17773
|
-
name: "removeAttrs";
|
|
17774
|
-
params?: {
|
|
17775
|
-
attrs?: (string | string[]);
|
|
17776
|
-
elemSeparator?: string;
|
|
17777
|
-
preserveCurrentColor?: boolean;
|
|
17778
|
-
};
|
|
17779
|
-
} | {
|
|
17780
|
-
name: "removeComments";
|
|
17781
|
-
params?: {
|
|
17782
|
-
preservePatterns?: (false | string[]);
|
|
17783
|
-
};
|
|
17784
|
-
} | {
|
|
17785
|
-
name: "removeDeprecatedAttrs";
|
|
17786
|
-
params?: {
|
|
17787
|
-
removeUnsafe?: boolean;
|
|
17788
|
-
};
|
|
17789
|
-
} | {
|
|
17790
|
-
name: "removeDesc";
|
|
17791
|
-
params?: {
|
|
17792
|
-
removeAny?: boolean;
|
|
17793
|
-
};
|
|
17794
|
-
} | {
|
|
17795
|
-
name: "removeDimensions";
|
|
17796
|
-
} | {
|
|
17797
|
-
name: "removeDoctype";
|
|
17798
|
-
} | {
|
|
17799
|
-
name: "removeEditorsNSData";
|
|
17800
|
-
params?: {
|
|
17801
|
-
additionalNamespaces?: string[];
|
|
17802
|
-
};
|
|
17803
|
-
} | {
|
|
17804
|
-
name: "removeElementsByAttr";
|
|
17805
|
-
params?: {
|
|
17806
|
-
id?: (string | string[]);
|
|
17807
|
-
class?: (string | string[]);
|
|
17808
|
-
};
|
|
17809
|
-
} | {
|
|
17810
|
-
name: "removeEmptyAttrs";
|
|
17811
|
-
} | {
|
|
17812
|
-
name: "removeEmptyContainers";
|
|
17813
|
-
} | {
|
|
17814
|
-
name: "removeEmptyText";
|
|
17815
|
-
params?: {
|
|
17816
|
-
text?: boolean;
|
|
17817
|
-
tspan?: boolean;
|
|
17818
|
-
tref?: boolean;
|
|
17819
|
-
};
|
|
17820
|
-
} | {
|
|
17821
|
-
name: "removeHiddenElems";
|
|
17822
|
-
params?: {
|
|
17823
|
-
isHidden?: boolean;
|
|
17824
|
-
displayNone?: boolean;
|
|
17825
|
-
opacity0?: boolean;
|
|
17826
|
-
circleR0?: boolean;
|
|
17827
|
-
ellipseRX0?: boolean;
|
|
17828
|
-
ellipseRY0?: boolean;
|
|
17829
|
-
rectWidth0?: boolean;
|
|
17830
|
-
rectHeight0?: boolean;
|
|
17831
|
-
patternWidth0?: boolean;
|
|
17832
|
-
patternHeight0?: boolean;
|
|
17833
|
-
imageWidth0?: boolean;
|
|
17834
|
-
imageHeight0?: boolean;
|
|
17835
|
-
pathEmptyD?: boolean;
|
|
17836
|
-
polylineEmptyPoints?: boolean;
|
|
17837
|
-
polygonEmptyPoints?: boolean;
|
|
17838
|
-
};
|
|
17839
|
-
} | {
|
|
17840
|
-
name: "removeMetadata";
|
|
17841
|
-
} | {
|
|
17842
|
-
name: "removeNonInheritableGroupAttrs";
|
|
17843
|
-
} | {
|
|
17844
|
-
name: "removeOffCanvasPaths";
|
|
17845
|
-
} | {
|
|
17846
|
-
name: "removeRasterImages";
|
|
17847
|
-
} | {
|
|
17848
|
-
name: "removeScripts";
|
|
17849
|
-
} | {
|
|
17850
|
-
name: "removeStyleElement";
|
|
17851
|
-
} | {
|
|
17852
|
-
name: "removeTitle";
|
|
17853
|
-
} | {
|
|
17854
|
-
name: "removeUnknownsAndDefaults";
|
|
17855
|
-
params?: {
|
|
17856
|
-
unknownContent?: boolean;
|
|
17857
|
-
unknownAttrs?: boolean;
|
|
17858
|
-
defaultAttrs?: boolean;
|
|
17859
|
-
defaultMarkupDeclarations?: boolean;
|
|
17860
|
-
uselessOverrides?: boolean;
|
|
17861
|
-
keepDataAttrs?: boolean;
|
|
17862
|
-
keepAriaAttrs?: boolean;
|
|
17863
|
-
keepRoleAttr?: boolean;
|
|
17864
|
-
};
|
|
17865
|
-
} | {
|
|
17866
|
-
name: "removeUnusedNS";
|
|
17867
|
-
} | {
|
|
17868
|
-
name: "removeUselessDefs";
|
|
17869
|
-
} | {
|
|
17870
|
-
name: "removeUselessStrokeAndFill";
|
|
17871
|
-
params?: {
|
|
17872
|
-
stroke?: boolean;
|
|
17873
|
-
fill?: boolean;
|
|
17874
|
-
removeNone?: boolean;
|
|
17875
|
-
};
|
|
17876
|
-
} | {
|
|
17877
|
-
name: "removeViewBox";
|
|
17878
|
-
} | {
|
|
17879
|
-
name: "removeXlink";
|
|
17880
|
-
params?: {
|
|
17881
|
-
includeLegacy?: boolean;
|
|
17882
|
-
};
|
|
17883
|
-
} | {
|
|
17884
|
-
name: "removeXMLNS";
|
|
17885
|
-
} | {
|
|
17886
|
-
name: "removeXMLProcInst";
|
|
17887
|
-
} | {
|
|
17888
|
-
name: "reusePaths";
|
|
17889
|
-
} | {
|
|
17890
|
-
name: "sortAttrs";
|
|
17891
|
-
params?: {
|
|
17892
|
-
order?: string[];
|
|
17893
|
-
xmlnsOrder?: ("front" | "alphabetical");
|
|
17894
|
-
};
|
|
17895
|
-
} | {
|
|
17896
|
-
name: "sortDefsChildren";
|
|
17897
17961
|
})[];
|
|
17898
17962
|
svgoConfig?: (boolean | string);
|
|
17963
|
+
reportMode?: ("diff" | "summary");
|
|
17899
17964
|
}];
|
|
17900
17965
|
// ----- switch-colon-spacing -----
|
|
17901
17966
|
type SwitchColonSpacing = [] | [{
|
|
@@ -19738,6 +19803,7 @@ type VueSortKeys = [] | [("asc" | "desc")] | [("asc" | "desc"), {
|
|
|
19738
19803
|
ignoreGrandchildrenOf?: unknown[];
|
|
19739
19804
|
minKeys?: number;
|
|
19740
19805
|
natural?: boolean;
|
|
19806
|
+
allowLineSeparatedGroups?: boolean;
|
|
19741
19807
|
}];
|
|
19742
19808
|
// ----- vue/space-in-parens -----
|
|
19743
19809
|
type VueSpaceInParens = [] | [("always" | "never")] | [("always" | "never"), {
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
4
|
+
"version": "7.0.0-beta.14",
|
|
5
5
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"eslint",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"@html-eslint/parser": "^0.64.0",
|
|
44
44
|
"astro-eslint-parser": "^3.0.0",
|
|
45
45
|
"eslint": "^10.4.0",
|
|
46
|
-
"eslint-plugin-astro": "^3.0.
|
|
47
|
-
"eslint-plugin-eslint-plugin": "^7.
|
|
46
|
+
"eslint-plugin-astro": "^3.0.1",
|
|
47
|
+
"eslint-plugin-eslint-plugin": "^7.5.0",
|
|
48
48
|
"eslint-plugin-pnpm": "^1.6.1",
|
|
49
|
-
"eslint-plugin-svelte": "^3.
|
|
49
|
+
"eslint-plugin-svelte": "^3.22.0",
|
|
50
50
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
51
|
-
"svelte": "^5.56.
|
|
51
|
+
"svelte": "^5.56.7",
|
|
52
52
|
"svelte-eslint-parser": "^1.8.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
@@ -84,14 +84,14 @@
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@antfu/install-pkg": "^
|
|
87
|
+
"@antfu/install-pkg": "^2.0.1",
|
|
88
88
|
"@clack/prompts": "^1.7.0",
|
|
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.
|
|
92
|
+
"@ntnyq/utils": "^0.21.0",
|
|
93
93
|
"@unocss/eslint-plugin": "^66.7.5",
|
|
94
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
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,47 +103,46 @@
|
|
|
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.
|
|
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.
|
|
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.
|
|
117
|
-
"eslint-plugin-toml": "^1.
|
|
116
|
+
"eslint-plugin-svgo": "^0.13.0",
|
|
117
|
+
"eslint-plugin-toml": "^1.5.0",
|
|
118
118
|
"eslint-plugin-unicorn": "^72.0.0",
|
|
119
|
-
"eslint-plugin-vue": "^10.
|
|
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.
|
|
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",
|
|
126
|
-
"typescript-eslint": "^8.
|
|
126
|
+
"typescript-eslint": "^8.65.0",
|
|
127
127
|
"vue-eslint-parser": "^10.4.1",
|
|
128
128
|
"yaml-eslint-parser": "^2.1.0"
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
|
-
"@types/node": "^26.1.
|
|
132
|
-
"@typescript-eslint/types": "^8.
|
|
133
|
-
"@typescript-eslint/utils": "^8.64.0",
|
|
131
|
+
"@types/node": "^26.1.2",
|
|
132
|
+
"@typescript-eslint/types": "^8.65.0",
|
|
134
133
|
"@typescript/native-preview": "^7.0.0-dev.20260707.2",
|
|
135
|
-
"bumpp": "^
|
|
134
|
+
"bumpp": "^12.0.0",
|
|
136
135
|
"consola": "^3.4.2",
|
|
137
|
-
"eslint": "^10.
|
|
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.
|
|
144
|
-
"prettier": "^3.9.
|
|
142
|
+
"oxfmt": "^0.61.0",
|
|
143
|
+
"prettier": "^3.9.6",
|
|
145
144
|
"tinyglobby": "^0.2.17",
|
|
146
|
-
"tsdown": "^0.22.
|
|
145
|
+
"tsdown": "^0.22.14",
|
|
147
146
|
"tsx": "^4.23.1",
|
|
148
147
|
"typescript": "^6.0.3",
|
|
149
148
|
"uncase": "^0.2.0",
|