@ntnyq/eslint-config 2.8.0 → 2.8.1
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/README.md +9 -1
- package/dist/index.cjs +42 -0
- package/dist/index.d.cts +316 -3
- package/dist/index.d.ts +316 -3
- package/dist/index.js +47 -7
- package/package.json +10 -9
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ pnpm add @ntnyq/eslint-config -D
|
|
|
13
13
|
|
|
14
14
|
## Usage
|
|
15
15
|
|
|
16
|
-
Config in `eslint.config.mjs`:
|
|
16
|
+
Config in `eslint.config.{mjs,mts}`:
|
|
17
17
|
|
|
18
18
|
```js
|
|
19
19
|
import { ntnyq } from '@ntnyq/eslint-config'
|
|
@@ -21,6 +21,14 @@ import { ntnyq } from '@ntnyq/eslint-config'
|
|
|
21
21
|
export default ntnyq()
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
Config in `eslint.config.{cjs,cts}`
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
const ntnyq = require('@ntnyq/eslint-config')
|
|
28
|
+
|
|
29
|
+
module.exports = ntnyq()
|
|
30
|
+
```
|
|
31
|
+
|
|
24
32
|
## Credits
|
|
25
33
|
|
|
26
34
|
- [@sxzz/eslint-config](https://github.com/sxzz/eslint-config)
|
package/dist/index.cjs
CHANGED
|
@@ -76,12 +76,14 @@ __export(src_exports, {
|
|
|
76
76
|
parserToml: () => parserToml,
|
|
77
77
|
parserVue: () => parserVue,
|
|
78
78
|
parserYaml: () => parserYaml,
|
|
79
|
+
perfectionist: () => perfectionist,
|
|
79
80
|
pluginComments: () => import_eslint_plugin_eslint_comments.default,
|
|
80
81
|
pluginImport: () => import_eslint_plugin_import_x.default,
|
|
81
82
|
pluginJsdoc: () => import_eslint_plugin_jsdoc.default,
|
|
82
83
|
pluginJsonc: () => import_eslint_plugin_jsonc.default,
|
|
83
84
|
pluginMarkdown: () => import_eslint_plugin_markdown.default,
|
|
84
85
|
pluginNode: () => import_eslint_plugin_n.default,
|
|
86
|
+
pluginPerfectionist: () => import_eslint_plugin_perfectionist.default,
|
|
85
87
|
pluginPrettier: () => import_eslint_plugin_prettier.default,
|
|
86
88
|
pluginRegexp: () => pluginRegexp,
|
|
87
89
|
pluginToml: () => import_eslint_plugin_toml.default,
|
|
@@ -243,6 +245,7 @@ var import_eslint_plugin_unicorn = __toESM(require("eslint-plugin-unicorn"), 1);
|
|
|
243
245
|
var import_eslint_plugin_import_x = __toESM(require("eslint-plugin-import-x"), 1);
|
|
244
246
|
var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
|
|
245
247
|
var import_eslint_plugin_markdown = __toESM(require("eslint-plugin-markdown"), 1);
|
|
248
|
+
var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
|
|
246
249
|
var import_eslint_plugin_unused_imports = __toESM(require("@antfu/eslint-plugin-unused-imports"), 1);
|
|
247
250
|
var import_eslint_plugin_eslint_comments = __toESM(require("@eslint-community/eslint-plugin-eslint-comments"), 1);
|
|
248
251
|
var parserToml = __toESM(require("toml-eslint-parser"), 1);
|
|
@@ -824,6 +827,43 @@ var unusedImports = defineConfig([
|
|
|
824
827
|
}
|
|
825
828
|
]);
|
|
826
829
|
|
|
830
|
+
// src/configs/perfectionist.ts
|
|
831
|
+
var perfectionist = defineConfig([
|
|
832
|
+
{
|
|
833
|
+
name: "ntnyq/perfectionist",
|
|
834
|
+
plugins: {
|
|
835
|
+
perfectionist: import_eslint_plugin_perfectionist.default
|
|
836
|
+
},
|
|
837
|
+
rules: {
|
|
838
|
+
"perfectionist/sort-imports": [
|
|
839
|
+
"error",
|
|
840
|
+
{
|
|
841
|
+
groups: [
|
|
842
|
+
"builtin",
|
|
843
|
+
"external",
|
|
844
|
+
"internal",
|
|
845
|
+
"internal-type",
|
|
846
|
+
"parent",
|
|
847
|
+
"parent-type",
|
|
848
|
+
"sibling",
|
|
849
|
+
"sibling-type",
|
|
850
|
+
"index",
|
|
851
|
+
"index-type",
|
|
852
|
+
"object",
|
|
853
|
+
"type",
|
|
854
|
+
"side-effect",
|
|
855
|
+
"side-effect-style"
|
|
856
|
+
],
|
|
857
|
+
internalPattern: ["~/**", "@/**", "#**"],
|
|
858
|
+
newlinesBetween: "ignore"
|
|
859
|
+
}
|
|
860
|
+
],
|
|
861
|
+
"perfectionist/sort-named-exports": ["warn", { groupKind: "values-first" }],
|
|
862
|
+
"perfectionist/sort-named-imports": ["warn", { groupKind: "values-first" }]
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
]);
|
|
866
|
+
|
|
827
867
|
// src/configs/regexp.ts
|
|
828
868
|
var regexp = defineConfig([
|
|
829
869
|
/**
|
|
@@ -1564,12 +1604,14 @@ function ntnyq(config = [], {
|
|
|
1564
1604
|
parserToml,
|
|
1565
1605
|
parserVue,
|
|
1566
1606
|
parserYaml,
|
|
1607
|
+
perfectionist,
|
|
1567
1608
|
pluginComments,
|
|
1568
1609
|
pluginImport,
|
|
1569
1610
|
pluginJsdoc,
|
|
1570
1611
|
pluginJsonc,
|
|
1571
1612
|
pluginMarkdown,
|
|
1572
1613
|
pluginNode,
|
|
1614
|
+
pluginPerfectionist,
|
|
1573
1615
|
pluginPrettier,
|
|
1574
1616
|
pluginRegexp,
|
|
1575
1617
|
pluginToml,
|
package/dist/index.d.cts
CHANGED
|
@@ -13,6 +13,7 @@ export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
|
13
13
|
export { default as pluginImport } from 'eslint-plugin-import-x';
|
|
14
14
|
export { default as pluginPrettier } from 'eslint-plugin-prettier';
|
|
15
15
|
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
16
|
+
export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
|
|
16
17
|
export { default as pluginUnusedImports } from '@antfu/eslint-plugin-unused-imports';
|
|
17
18
|
export { default as pluginComments } from '@eslint-community/eslint-plugin-eslint-comments';
|
|
18
19
|
import * as tomlEslintParser from 'toml-eslint-parser';
|
|
@@ -984,7 +985,7 @@ interface RuleOptions {
|
|
|
984
985
|
'jsdoc/check-tag-names'?: Linter.RuleEntry<JsdocCheckTagNames>;
|
|
985
986
|
/**
|
|
986
987
|
* Checks that any `@template` names are actually used in the connected `@typedef` or type alias.
|
|
987
|
-
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/
|
|
988
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-template-names.md#repos-sticky-header
|
|
988
989
|
*/
|
|
989
990
|
'jsdoc/check-template-names'?: Linter.RuleEntry<[]>;
|
|
990
991
|
/**
|
|
@@ -1022,6 +1023,11 @@ interface RuleOptions {
|
|
|
1022
1023
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md#repos-sticky-header
|
|
1023
1024
|
*/
|
|
1024
1025
|
'jsdoc/informative-docs'?: Linter.RuleEntry<JsdocInformativeDocs>;
|
|
1026
|
+
/**
|
|
1027
|
+
* Enforces minimum number of newlines before JSDoc comment blocks
|
|
1028
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/lines-before-block.md#repos-sticky-header
|
|
1029
|
+
*/
|
|
1030
|
+
'jsdoc/lines-before-block'?: Linter.RuleEntry<JsdocLinesBeforeBlock>;
|
|
1025
1031
|
/**
|
|
1026
1032
|
* Enforces a regular expression pattern on descriptions.
|
|
1027
1033
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-description.md#repos-sticky-header
|
|
@@ -1637,6 +1643,101 @@ interface RuleOptions {
|
|
|
1637
1643
|
* @deprecated
|
|
1638
1644
|
*/
|
|
1639
1645
|
'node/shebang'?: Linter.RuleEntry<NodeShebang>;
|
|
1646
|
+
/**
|
|
1647
|
+
* Enforce sorted arrays before include method.
|
|
1648
|
+
* @see https://perfectionist.dev/rules/sort-array-includes
|
|
1649
|
+
*/
|
|
1650
|
+
'perfectionist/sort-array-includes'?: Linter.RuleEntry<PerfectionistSortArrayIncludes>;
|
|
1651
|
+
/**
|
|
1652
|
+
* Enforce sorted Astro attributes.
|
|
1653
|
+
* @see https://perfectionist.dev/rules/sort-astro-attributes
|
|
1654
|
+
*/
|
|
1655
|
+
'perfectionist/sort-astro-attributes'?: Linter.RuleEntry<PerfectionistSortAstroAttributes>;
|
|
1656
|
+
/**
|
|
1657
|
+
* Enforce sorted classes.
|
|
1658
|
+
* @see https://perfectionist.dev/rules/sort-classes
|
|
1659
|
+
*/
|
|
1660
|
+
'perfectionist/sort-classes'?: Linter.RuleEntry<PerfectionistSortClasses>;
|
|
1661
|
+
/**
|
|
1662
|
+
* Enforce sorted TypeScript enums.
|
|
1663
|
+
* @see https://perfectionist.dev/rules/sort-enums
|
|
1664
|
+
*/
|
|
1665
|
+
'perfectionist/sort-enums'?: Linter.RuleEntry<PerfectionistSortEnums>;
|
|
1666
|
+
/**
|
|
1667
|
+
* Enforce sorted exports.
|
|
1668
|
+
* @see https://perfectionist.dev/rules/sort-exports
|
|
1669
|
+
*/
|
|
1670
|
+
'perfectionist/sort-exports'?: Linter.RuleEntry<PerfectionistSortExports>;
|
|
1671
|
+
/**
|
|
1672
|
+
* Enforce sorted imports.
|
|
1673
|
+
* @see https://perfectionist.dev/rules/sort-imports
|
|
1674
|
+
*/
|
|
1675
|
+
'perfectionist/sort-imports'?: Linter.RuleEntry<PerfectionistSortImports>;
|
|
1676
|
+
/**
|
|
1677
|
+
* Enforce sorted interface properties.
|
|
1678
|
+
* @see https://perfectionist.dev/rules/sort-interfaces
|
|
1679
|
+
*/
|
|
1680
|
+
'perfectionist/sort-interfaces'?: Linter.RuleEntry<PerfectionistSortInterfaces>;
|
|
1681
|
+
/**
|
|
1682
|
+
* Enforce sorted intersection types.
|
|
1683
|
+
* @see https://perfectionist.dev/rules/sort-intersection-types
|
|
1684
|
+
*/
|
|
1685
|
+
'perfectionist/sort-intersection-types'?: Linter.RuleEntry<PerfectionistSortIntersectionTypes>;
|
|
1686
|
+
/**
|
|
1687
|
+
* Enforce sorted JSX props.
|
|
1688
|
+
* @see https://perfectionist.dev/rules/sort-jsx-props
|
|
1689
|
+
*/
|
|
1690
|
+
'perfectionist/sort-jsx-props'?: Linter.RuleEntry<PerfectionistSortJsxProps>;
|
|
1691
|
+
/**
|
|
1692
|
+
* Enforce sorted Map elements.
|
|
1693
|
+
* @see https://perfectionist.dev/rules/sort-maps
|
|
1694
|
+
*/
|
|
1695
|
+
'perfectionist/sort-maps'?: Linter.RuleEntry<PerfectionistSortMaps>;
|
|
1696
|
+
/**
|
|
1697
|
+
* Enforce sorted named exports.
|
|
1698
|
+
* @see https://perfectionist.dev/rules/sort-named-exports
|
|
1699
|
+
*/
|
|
1700
|
+
'perfectionist/sort-named-exports'?: Linter.RuleEntry<PerfectionistSortNamedExports>;
|
|
1701
|
+
/**
|
|
1702
|
+
* Enforce sorted named imports.
|
|
1703
|
+
* @see https://perfectionist.dev/rules/sort-named-imports
|
|
1704
|
+
*/
|
|
1705
|
+
'perfectionist/sort-named-imports'?: Linter.RuleEntry<PerfectionistSortNamedImports>;
|
|
1706
|
+
/**
|
|
1707
|
+
* Enforce sorted object types.
|
|
1708
|
+
* @see https://perfectionist.dev/rules/sort-object-types
|
|
1709
|
+
*/
|
|
1710
|
+
'perfectionist/sort-object-types'?: Linter.RuleEntry<PerfectionistSortObjectTypes>;
|
|
1711
|
+
/**
|
|
1712
|
+
* Enforce sorted objects.
|
|
1713
|
+
* @see https://perfectionist.dev/rules/sort-objects
|
|
1714
|
+
*/
|
|
1715
|
+
'perfectionist/sort-objects'?: Linter.RuleEntry<PerfectionistSortObjects>;
|
|
1716
|
+
/**
|
|
1717
|
+
* Enforce sorted Svelte attributes.
|
|
1718
|
+
* @see https://perfectionist.dev/rules/sort-svelte-attributes
|
|
1719
|
+
*/
|
|
1720
|
+
'perfectionist/sort-svelte-attributes'?: Linter.RuleEntry<PerfectionistSortSvelteAttributes>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Enforce sorted switch cases.
|
|
1723
|
+
* @see https://perfectionist.dev/rules/sort-switch-case
|
|
1724
|
+
*/
|
|
1725
|
+
'perfectionist/sort-switch-case'?: Linter.RuleEntry<PerfectionistSortSwitchCase>;
|
|
1726
|
+
/**
|
|
1727
|
+
* Enforce sorted union types.
|
|
1728
|
+
* @see https://perfectionist.dev/rules/sort-union-types
|
|
1729
|
+
*/
|
|
1730
|
+
'perfectionist/sort-union-types'?: Linter.RuleEntry<PerfectionistSortUnionTypes>;
|
|
1731
|
+
/**
|
|
1732
|
+
* Enforce sorted variable declarations.
|
|
1733
|
+
* @see https://perfectionist.dev/rules/sort-variable-declarations
|
|
1734
|
+
*/
|
|
1735
|
+
'perfectionist/sort-variable-declarations'?: Linter.RuleEntry<PerfectionistSortVariableDeclarations>;
|
|
1736
|
+
/**
|
|
1737
|
+
* Enforce sorted Vue attributes.
|
|
1738
|
+
* @see https://perfectionist.dev/rules/sort-vue-attributes
|
|
1739
|
+
*/
|
|
1740
|
+
'perfectionist/sort-vue-attributes'?: Linter.RuleEntry<PerfectionistSortVueAttributes>;
|
|
1640
1741
|
/**
|
|
1641
1742
|
* @see https://github.com/prettier/eslint-plugin-prettier#options
|
|
1642
1743
|
*/
|
|
@@ -5541,6 +5642,13 @@ type JsdocInformativeDocs = [] | [
|
|
|
5541
5642
|
uselessWords?: string[];
|
|
5542
5643
|
}
|
|
5543
5644
|
];
|
|
5645
|
+
type JsdocLinesBeforeBlock = [] | [
|
|
5646
|
+
{
|
|
5647
|
+
excludedTags?: string[];
|
|
5648
|
+
ignoreSameLine?: boolean;
|
|
5649
|
+
lines?: number;
|
|
5650
|
+
}
|
|
5651
|
+
];
|
|
5544
5652
|
type JsdocMatchDescription = [] | [
|
|
5545
5653
|
{
|
|
5546
5654
|
contexts?: (string | {
|
|
@@ -6454,6 +6562,209 @@ type NodeShebang = [] | [
|
|
|
6454
6562
|
};
|
|
6455
6563
|
}
|
|
6456
6564
|
];
|
|
6565
|
+
type PerfectionistSortArrayIncludes = [] | [
|
|
6566
|
+
{
|
|
6567
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6568
|
+
order?: ("asc" | "desc");
|
|
6569
|
+
ignoreCase?: boolean;
|
|
6570
|
+
groupKind?: ("mixed" | "literals-first" | "spreads-first");
|
|
6571
|
+
}
|
|
6572
|
+
];
|
|
6573
|
+
type PerfectionistSortAstroAttributes = [] | [
|
|
6574
|
+
{
|
|
6575
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6576
|
+
order?: ("asc" | "desc");
|
|
6577
|
+
ignoreCase?: boolean;
|
|
6578
|
+
groups?: (string | string[])[];
|
|
6579
|
+
customGroups?: {
|
|
6580
|
+
[k: string]: (string | string[]) | undefined;
|
|
6581
|
+
};
|
|
6582
|
+
}
|
|
6583
|
+
];
|
|
6584
|
+
type PerfectionistSortClasses = [] | [
|
|
6585
|
+
{
|
|
6586
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6587
|
+
order?: ("asc" | "desc");
|
|
6588
|
+
ignoreCase?: boolean;
|
|
6589
|
+
partitionByComment?: (string[] | boolean | string);
|
|
6590
|
+
groups?: (string | string[])[];
|
|
6591
|
+
customGroups?: {
|
|
6592
|
+
[k: string]: (string | string[]) | undefined;
|
|
6593
|
+
};
|
|
6594
|
+
}
|
|
6595
|
+
];
|
|
6596
|
+
type PerfectionistSortEnums = [] | [
|
|
6597
|
+
{
|
|
6598
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6599
|
+
order?: ("asc" | "desc");
|
|
6600
|
+
ignoreCase?: boolean;
|
|
6601
|
+
partitionByComment?: (string[] | boolean | string);
|
|
6602
|
+
}
|
|
6603
|
+
];
|
|
6604
|
+
type PerfectionistSortExports = [] | [
|
|
6605
|
+
{
|
|
6606
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6607
|
+
order?: ("asc" | "desc");
|
|
6608
|
+
ignoreCase?: boolean;
|
|
6609
|
+
}
|
|
6610
|
+
];
|
|
6611
|
+
type PerfectionistSortImports = [] | [_PerfectionistSortImportsSortImports];
|
|
6612
|
+
type _PerfectionistSortImportsSortImports = (_PerfectionistSortImportsMaxLineLengthRequiresLineLengthType & {
|
|
6613
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6614
|
+
order?: ("asc" | "desc");
|
|
6615
|
+
ignoreCase?: boolean;
|
|
6616
|
+
internalPattern?: string[];
|
|
6617
|
+
newlinesBetween?: ("ignore" | "always" | "never");
|
|
6618
|
+
maxLineLength?: number;
|
|
6619
|
+
groups?: (string | string[])[];
|
|
6620
|
+
customGroups?: {
|
|
6621
|
+
type?: {
|
|
6622
|
+
[k: string]: unknown | undefined;
|
|
6623
|
+
};
|
|
6624
|
+
value?: {
|
|
6625
|
+
[k: string]: unknown | undefined;
|
|
6626
|
+
};
|
|
6627
|
+
};
|
|
6628
|
+
environment?: ("node" | "bun");
|
|
6629
|
+
});
|
|
6630
|
+
type _PerfectionistSortImportsMaxLineLengthRequiresLineLengthType = ({
|
|
6631
|
+
[k: string]: unknown | undefined;
|
|
6632
|
+
} | _PerfectionistSortImports_IsLineLength);
|
|
6633
|
+
interface _PerfectionistSortImports_IsLineLength {
|
|
6634
|
+
type: "line-length";
|
|
6635
|
+
[k: string]: unknown | undefined;
|
|
6636
|
+
}
|
|
6637
|
+
type PerfectionistSortInterfaces = [] | [
|
|
6638
|
+
{
|
|
6639
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6640
|
+
order?: ("asc" | "desc");
|
|
6641
|
+
ignoreCase?: boolean;
|
|
6642
|
+
ignorePattern?: string[];
|
|
6643
|
+
partitionByNewLine?: boolean;
|
|
6644
|
+
groupKind?: ("mixed" | "optional-first" | "required-first");
|
|
6645
|
+
groups?: (string | string[])[];
|
|
6646
|
+
customGroups?: {
|
|
6647
|
+
[k: string]: (string | string[]) | undefined;
|
|
6648
|
+
};
|
|
6649
|
+
}
|
|
6650
|
+
];
|
|
6651
|
+
type PerfectionistSortIntersectionTypes = [] | [
|
|
6652
|
+
{
|
|
6653
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6654
|
+
order?: ("asc" | "desc");
|
|
6655
|
+
ignoreCase?: boolean;
|
|
6656
|
+
groups?: (string | string[])[];
|
|
6657
|
+
}
|
|
6658
|
+
];
|
|
6659
|
+
type PerfectionistSortJsxProps = [] | [
|
|
6660
|
+
{
|
|
6661
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6662
|
+
order?: ("asc" | "desc");
|
|
6663
|
+
ignoreCase?: boolean;
|
|
6664
|
+
ignorePattern?: string[];
|
|
6665
|
+
groups?: (string | string[])[];
|
|
6666
|
+
customGroups?: {
|
|
6667
|
+
[k: string]: (string | string[]) | undefined;
|
|
6668
|
+
};
|
|
6669
|
+
}
|
|
6670
|
+
];
|
|
6671
|
+
type PerfectionistSortMaps = [] | [
|
|
6672
|
+
{
|
|
6673
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6674
|
+
order?: ("asc" | "desc");
|
|
6675
|
+
ignoreCase?: boolean;
|
|
6676
|
+
}
|
|
6677
|
+
];
|
|
6678
|
+
type PerfectionistSortNamedExports = [] | [
|
|
6679
|
+
{
|
|
6680
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6681
|
+
order?: ("asc" | "desc");
|
|
6682
|
+
ignoreCase?: boolean;
|
|
6683
|
+
groupKind?: ("mixed" | "values-first" | "types-first");
|
|
6684
|
+
}
|
|
6685
|
+
];
|
|
6686
|
+
type PerfectionistSortNamedImports = [] | [
|
|
6687
|
+
{
|
|
6688
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6689
|
+
order?: ("asc" | "desc");
|
|
6690
|
+
ignoreCase?: boolean;
|
|
6691
|
+
ignoreAlias?: boolean;
|
|
6692
|
+
groupKind?: ("mixed" | "values-first" | "types-first");
|
|
6693
|
+
}
|
|
6694
|
+
];
|
|
6695
|
+
type PerfectionistSortObjectTypes = [] | [
|
|
6696
|
+
{
|
|
6697
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6698
|
+
order?: ("asc" | "desc");
|
|
6699
|
+
ignoreCase?: boolean;
|
|
6700
|
+
partitionByNewLine?: boolean;
|
|
6701
|
+
groupKind?: ("mixed" | "required-first" | "optional-first");
|
|
6702
|
+
groups?: (string | string[])[];
|
|
6703
|
+
customGroups?: {
|
|
6704
|
+
[k: string]: (string | string[]) | undefined;
|
|
6705
|
+
};
|
|
6706
|
+
}
|
|
6707
|
+
];
|
|
6708
|
+
type PerfectionistSortObjects = [] | [
|
|
6709
|
+
{
|
|
6710
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6711
|
+
order?: ("asc" | "desc");
|
|
6712
|
+
ignoreCase?: boolean;
|
|
6713
|
+
partitionByComment?: (string[] | boolean | string);
|
|
6714
|
+
partitionByNewLine?: boolean;
|
|
6715
|
+
styledComponents?: boolean;
|
|
6716
|
+
destructureOnly?: boolean;
|
|
6717
|
+
ignorePattern?: string[];
|
|
6718
|
+
groups?: (string | string[])[];
|
|
6719
|
+
customGroups?: {
|
|
6720
|
+
[k: string]: (string | string[]) | undefined;
|
|
6721
|
+
};
|
|
6722
|
+
}
|
|
6723
|
+
];
|
|
6724
|
+
type PerfectionistSortSvelteAttributes = [] | [
|
|
6725
|
+
{
|
|
6726
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6727
|
+
order?: ("asc" | "desc");
|
|
6728
|
+
ignoreCase?: boolean;
|
|
6729
|
+
groups?: (string | string[])[];
|
|
6730
|
+
customGroups?: {
|
|
6731
|
+
[k: string]: (string | string[]) | undefined;
|
|
6732
|
+
};
|
|
6733
|
+
}
|
|
6734
|
+
];
|
|
6735
|
+
type PerfectionistSortSwitchCase = [] | [
|
|
6736
|
+
{
|
|
6737
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6738
|
+
order?: ("asc" | "desc");
|
|
6739
|
+
ignoreCase?: boolean;
|
|
6740
|
+
}
|
|
6741
|
+
];
|
|
6742
|
+
type PerfectionistSortUnionTypes = [] | [
|
|
6743
|
+
{
|
|
6744
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6745
|
+
order?: ("asc" | "desc");
|
|
6746
|
+
ignoreCase?: boolean;
|
|
6747
|
+
groups?: (string | string[])[];
|
|
6748
|
+
}
|
|
6749
|
+
];
|
|
6750
|
+
type PerfectionistSortVariableDeclarations = [] | [
|
|
6751
|
+
{
|
|
6752
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6753
|
+
order?: ("asc" | "desc");
|
|
6754
|
+
ignoreCase?: boolean;
|
|
6755
|
+
}
|
|
6756
|
+
];
|
|
6757
|
+
type PerfectionistSortVueAttributes = [] | [
|
|
6758
|
+
{
|
|
6759
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6760
|
+
order?: ("asc" | "desc");
|
|
6761
|
+
ignoreCase?: boolean;
|
|
6762
|
+
groups?: (string | string[])[];
|
|
6763
|
+
customGroups?: {
|
|
6764
|
+
[k: string]: (string | string[]) | undefined;
|
|
6765
|
+
};
|
|
6766
|
+
}
|
|
6767
|
+
];
|
|
6457
6768
|
type PrettierPrettier = [] | [
|
|
6458
6769
|
{
|
|
6459
6770
|
[k: string]: unknown | undefined;
|
|
@@ -8458,7 +8769,7 @@ type YmlSpacedComment = [] | [("always" | "never")] | [
|
|
|
8458
8769
|
markers?: string[];
|
|
8459
8770
|
}
|
|
8460
8771
|
];
|
|
8461
|
-
type ConfigName = 'command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/script' | 'ntnyq/js/test' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'markdown/recommended/plugin' | 'markdown/recommended/processor' | 'markdown/recommended/code-blocks' | 'ntnyq/markdown/extensions' | 'ntnyq/node' | 'ntnyq/prettier' | 'ntnyq/prettier/ignore' | 'ntnyq/regexp' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/dts' | 'ntnyq/ts/test' | 'ntnyq/ts/cjs' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
|
|
8772
|
+
type ConfigName = 'command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/script' | 'ntnyq/js/test' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'markdown/recommended/plugin' | 'markdown/recommended/processor' | 'markdown/recommended/code-blocks' | 'ntnyq/markdown/extensions' | 'ntnyq/node' | 'ntnyq/prettier' | 'ntnyq/prettier/ignore' | 'ntnyq/regexp' | 'ntnyq/perfectionist' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/dts' | 'ntnyq/ts/test' | 'ntnyq/ts/cjs' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
|
|
8462
8773
|
|
|
8463
8774
|
/**
|
|
8464
8775
|
* Parser options
|
|
@@ -8592,6 +8903,8 @@ declare const typescript: TypedConfigItem[];
|
|
|
8592
8903
|
|
|
8593
8904
|
declare const unusedImports: TypedConfigItem[];
|
|
8594
8905
|
|
|
8906
|
+
declare const perfectionist: TypedConfigItem[];
|
|
8907
|
+
|
|
8595
8908
|
declare const regexp: TypedConfigItem[];
|
|
8596
8909
|
|
|
8597
8910
|
declare const unocss: TypedConfigItem[];
|
|
@@ -8612,4 +8925,4 @@ declare const markdown: TypedConfigItem[];
|
|
|
8612
8925
|
declare function getVueVersion(): number;
|
|
8613
8926
|
declare const vue: TypedConfigItem[];
|
|
8614
8927
|
|
|
8615
|
-
export { type Arrayable, type Awaitable, type ConfigName, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type OverridesOptions, type ParserOptions, type RuleOptions, type RuleRecord, type RuleRecordEntry, type Rules, type TypedConfigItem, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, prettier, regexp, sortPackageJson, sortTsConfig, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vue, yml };
|
|
8928
|
+
export { type Arrayable, type Awaitable, type ConfigName, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type OverridesOptions, type ParserOptions, type RuleOptions, type RuleRecord, type RuleRecordEntry, type Rules, type TypedConfigItem, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, sortPackageJson, sortTsConfig, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vue, yml };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
|
13
13
|
export { default as pluginImport } from 'eslint-plugin-import-x';
|
|
14
14
|
export { default as pluginPrettier } from 'eslint-plugin-prettier';
|
|
15
15
|
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
16
|
+
export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
|
|
16
17
|
export { default as pluginUnusedImports } from '@antfu/eslint-plugin-unused-imports';
|
|
17
18
|
export { default as pluginComments } from '@eslint-community/eslint-plugin-eslint-comments';
|
|
18
19
|
import * as tomlEslintParser from 'toml-eslint-parser';
|
|
@@ -984,7 +985,7 @@ interface RuleOptions {
|
|
|
984
985
|
'jsdoc/check-tag-names'?: Linter.RuleEntry<JsdocCheckTagNames>;
|
|
985
986
|
/**
|
|
986
987
|
* Checks that any `@template` names are actually used in the connected `@typedef` or type alias.
|
|
987
|
-
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/
|
|
988
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-template-names.md#repos-sticky-header
|
|
988
989
|
*/
|
|
989
990
|
'jsdoc/check-template-names'?: Linter.RuleEntry<[]>;
|
|
990
991
|
/**
|
|
@@ -1022,6 +1023,11 @@ interface RuleOptions {
|
|
|
1022
1023
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md#repos-sticky-header
|
|
1023
1024
|
*/
|
|
1024
1025
|
'jsdoc/informative-docs'?: Linter.RuleEntry<JsdocInformativeDocs>;
|
|
1026
|
+
/**
|
|
1027
|
+
* Enforces minimum number of newlines before JSDoc comment blocks
|
|
1028
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/lines-before-block.md#repos-sticky-header
|
|
1029
|
+
*/
|
|
1030
|
+
'jsdoc/lines-before-block'?: Linter.RuleEntry<JsdocLinesBeforeBlock>;
|
|
1025
1031
|
/**
|
|
1026
1032
|
* Enforces a regular expression pattern on descriptions.
|
|
1027
1033
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-description.md#repos-sticky-header
|
|
@@ -1637,6 +1643,101 @@ interface RuleOptions {
|
|
|
1637
1643
|
* @deprecated
|
|
1638
1644
|
*/
|
|
1639
1645
|
'node/shebang'?: Linter.RuleEntry<NodeShebang>;
|
|
1646
|
+
/**
|
|
1647
|
+
* Enforce sorted arrays before include method.
|
|
1648
|
+
* @see https://perfectionist.dev/rules/sort-array-includes
|
|
1649
|
+
*/
|
|
1650
|
+
'perfectionist/sort-array-includes'?: Linter.RuleEntry<PerfectionistSortArrayIncludes>;
|
|
1651
|
+
/**
|
|
1652
|
+
* Enforce sorted Astro attributes.
|
|
1653
|
+
* @see https://perfectionist.dev/rules/sort-astro-attributes
|
|
1654
|
+
*/
|
|
1655
|
+
'perfectionist/sort-astro-attributes'?: Linter.RuleEntry<PerfectionistSortAstroAttributes>;
|
|
1656
|
+
/**
|
|
1657
|
+
* Enforce sorted classes.
|
|
1658
|
+
* @see https://perfectionist.dev/rules/sort-classes
|
|
1659
|
+
*/
|
|
1660
|
+
'perfectionist/sort-classes'?: Linter.RuleEntry<PerfectionistSortClasses>;
|
|
1661
|
+
/**
|
|
1662
|
+
* Enforce sorted TypeScript enums.
|
|
1663
|
+
* @see https://perfectionist.dev/rules/sort-enums
|
|
1664
|
+
*/
|
|
1665
|
+
'perfectionist/sort-enums'?: Linter.RuleEntry<PerfectionistSortEnums>;
|
|
1666
|
+
/**
|
|
1667
|
+
* Enforce sorted exports.
|
|
1668
|
+
* @see https://perfectionist.dev/rules/sort-exports
|
|
1669
|
+
*/
|
|
1670
|
+
'perfectionist/sort-exports'?: Linter.RuleEntry<PerfectionistSortExports>;
|
|
1671
|
+
/**
|
|
1672
|
+
* Enforce sorted imports.
|
|
1673
|
+
* @see https://perfectionist.dev/rules/sort-imports
|
|
1674
|
+
*/
|
|
1675
|
+
'perfectionist/sort-imports'?: Linter.RuleEntry<PerfectionistSortImports>;
|
|
1676
|
+
/**
|
|
1677
|
+
* Enforce sorted interface properties.
|
|
1678
|
+
* @see https://perfectionist.dev/rules/sort-interfaces
|
|
1679
|
+
*/
|
|
1680
|
+
'perfectionist/sort-interfaces'?: Linter.RuleEntry<PerfectionistSortInterfaces>;
|
|
1681
|
+
/**
|
|
1682
|
+
* Enforce sorted intersection types.
|
|
1683
|
+
* @see https://perfectionist.dev/rules/sort-intersection-types
|
|
1684
|
+
*/
|
|
1685
|
+
'perfectionist/sort-intersection-types'?: Linter.RuleEntry<PerfectionistSortIntersectionTypes>;
|
|
1686
|
+
/**
|
|
1687
|
+
* Enforce sorted JSX props.
|
|
1688
|
+
* @see https://perfectionist.dev/rules/sort-jsx-props
|
|
1689
|
+
*/
|
|
1690
|
+
'perfectionist/sort-jsx-props'?: Linter.RuleEntry<PerfectionistSortJsxProps>;
|
|
1691
|
+
/**
|
|
1692
|
+
* Enforce sorted Map elements.
|
|
1693
|
+
* @see https://perfectionist.dev/rules/sort-maps
|
|
1694
|
+
*/
|
|
1695
|
+
'perfectionist/sort-maps'?: Linter.RuleEntry<PerfectionistSortMaps>;
|
|
1696
|
+
/**
|
|
1697
|
+
* Enforce sorted named exports.
|
|
1698
|
+
* @see https://perfectionist.dev/rules/sort-named-exports
|
|
1699
|
+
*/
|
|
1700
|
+
'perfectionist/sort-named-exports'?: Linter.RuleEntry<PerfectionistSortNamedExports>;
|
|
1701
|
+
/**
|
|
1702
|
+
* Enforce sorted named imports.
|
|
1703
|
+
* @see https://perfectionist.dev/rules/sort-named-imports
|
|
1704
|
+
*/
|
|
1705
|
+
'perfectionist/sort-named-imports'?: Linter.RuleEntry<PerfectionistSortNamedImports>;
|
|
1706
|
+
/**
|
|
1707
|
+
* Enforce sorted object types.
|
|
1708
|
+
* @see https://perfectionist.dev/rules/sort-object-types
|
|
1709
|
+
*/
|
|
1710
|
+
'perfectionist/sort-object-types'?: Linter.RuleEntry<PerfectionistSortObjectTypes>;
|
|
1711
|
+
/**
|
|
1712
|
+
* Enforce sorted objects.
|
|
1713
|
+
* @see https://perfectionist.dev/rules/sort-objects
|
|
1714
|
+
*/
|
|
1715
|
+
'perfectionist/sort-objects'?: Linter.RuleEntry<PerfectionistSortObjects>;
|
|
1716
|
+
/**
|
|
1717
|
+
* Enforce sorted Svelte attributes.
|
|
1718
|
+
* @see https://perfectionist.dev/rules/sort-svelte-attributes
|
|
1719
|
+
*/
|
|
1720
|
+
'perfectionist/sort-svelte-attributes'?: Linter.RuleEntry<PerfectionistSortSvelteAttributes>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Enforce sorted switch cases.
|
|
1723
|
+
* @see https://perfectionist.dev/rules/sort-switch-case
|
|
1724
|
+
*/
|
|
1725
|
+
'perfectionist/sort-switch-case'?: Linter.RuleEntry<PerfectionistSortSwitchCase>;
|
|
1726
|
+
/**
|
|
1727
|
+
* Enforce sorted union types.
|
|
1728
|
+
* @see https://perfectionist.dev/rules/sort-union-types
|
|
1729
|
+
*/
|
|
1730
|
+
'perfectionist/sort-union-types'?: Linter.RuleEntry<PerfectionistSortUnionTypes>;
|
|
1731
|
+
/**
|
|
1732
|
+
* Enforce sorted variable declarations.
|
|
1733
|
+
* @see https://perfectionist.dev/rules/sort-variable-declarations
|
|
1734
|
+
*/
|
|
1735
|
+
'perfectionist/sort-variable-declarations'?: Linter.RuleEntry<PerfectionistSortVariableDeclarations>;
|
|
1736
|
+
/**
|
|
1737
|
+
* Enforce sorted Vue attributes.
|
|
1738
|
+
* @see https://perfectionist.dev/rules/sort-vue-attributes
|
|
1739
|
+
*/
|
|
1740
|
+
'perfectionist/sort-vue-attributes'?: Linter.RuleEntry<PerfectionistSortVueAttributes>;
|
|
1640
1741
|
/**
|
|
1641
1742
|
* @see https://github.com/prettier/eslint-plugin-prettier#options
|
|
1642
1743
|
*/
|
|
@@ -5541,6 +5642,13 @@ type JsdocInformativeDocs = [] | [
|
|
|
5541
5642
|
uselessWords?: string[];
|
|
5542
5643
|
}
|
|
5543
5644
|
];
|
|
5645
|
+
type JsdocLinesBeforeBlock = [] | [
|
|
5646
|
+
{
|
|
5647
|
+
excludedTags?: string[];
|
|
5648
|
+
ignoreSameLine?: boolean;
|
|
5649
|
+
lines?: number;
|
|
5650
|
+
}
|
|
5651
|
+
];
|
|
5544
5652
|
type JsdocMatchDescription = [] | [
|
|
5545
5653
|
{
|
|
5546
5654
|
contexts?: (string | {
|
|
@@ -6454,6 +6562,209 @@ type NodeShebang = [] | [
|
|
|
6454
6562
|
};
|
|
6455
6563
|
}
|
|
6456
6564
|
];
|
|
6565
|
+
type PerfectionistSortArrayIncludes = [] | [
|
|
6566
|
+
{
|
|
6567
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6568
|
+
order?: ("asc" | "desc");
|
|
6569
|
+
ignoreCase?: boolean;
|
|
6570
|
+
groupKind?: ("mixed" | "literals-first" | "spreads-first");
|
|
6571
|
+
}
|
|
6572
|
+
];
|
|
6573
|
+
type PerfectionistSortAstroAttributes = [] | [
|
|
6574
|
+
{
|
|
6575
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6576
|
+
order?: ("asc" | "desc");
|
|
6577
|
+
ignoreCase?: boolean;
|
|
6578
|
+
groups?: (string | string[])[];
|
|
6579
|
+
customGroups?: {
|
|
6580
|
+
[k: string]: (string | string[]) | undefined;
|
|
6581
|
+
};
|
|
6582
|
+
}
|
|
6583
|
+
];
|
|
6584
|
+
type PerfectionistSortClasses = [] | [
|
|
6585
|
+
{
|
|
6586
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6587
|
+
order?: ("asc" | "desc");
|
|
6588
|
+
ignoreCase?: boolean;
|
|
6589
|
+
partitionByComment?: (string[] | boolean | string);
|
|
6590
|
+
groups?: (string | string[])[];
|
|
6591
|
+
customGroups?: {
|
|
6592
|
+
[k: string]: (string | string[]) | undefined;
|
|
6593
|
+
};
|
|
6594
|
+
}
|
|
6595
|
+
];
|
|
6596
|
+
type PerfectionistSortEnums = [] | [
|
|
6597
|
+
{
|
|
6598
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6599
|
+
order?: ("asc" | "desc");
|
|
6600
|
+
ignoreCase?: boolean;
|
|
6601
|
+
partitionByComment?: (string[] | boolean | string);
|
|
6602
|
+
}
|
|
6603
|
+
];
|
|
6604
|
+
type PerfectionistSortExports = [] | [
|
|
6605
|
+
{
|
|
6606
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6607
|
+
order?: ("asc" | "desc");
|
|
6608
|
+
ignoreCase?: boolean;
|
|
6609
|
+
}
|
|
6610
|
+
];
|
|
6611
|
+
type PerfectionistSortImports = [] | [_PerfectionistSortImportsSortImports];
|
|
6612
|
+
type _PerfectionistSortImportsSortImports = (_PerfectionistSortImportsMaxLineLengthRequiresLineLengthType & {
|
|
6613
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6614
|
+
order?: ("asc" | "desc");
|
|
6615
|
+
ignoreCase?: boolean;
|
|
6616
|
+
internalPattern?: string[];
|
|
6617
|
+
newlinesBetween?: ("ignore" | "always" | "never");
|
|
6618
|
+
maxLineLength?: number;
|
|
6619
|
+
groups?: (string | string[])[];
|
|
6620
|
+
customGroups?: {
|
|
6621
|
+
type?: {
|
|
6622
|
+
[k: string]: unknown | undefined;
|
|
6623
|
+
};
|
|
6624
|
+
value?: {
|
|
6625
|
+
[k: string]: unknown | undefined;
|
|
6626
|
+
};
|
|
6627
|
+
};
|
|
6628
|
+
environment?: ("node" | "bun");
|
|
6629
|
+
});
|
|
6630
|
+
type _PerfectionistSortImportsMaxLineLengthRequiresLineLengthType = ({
|
|
6631
|
+
[k: string]: unknown | undefined;
|
|
6632
|
+
} | _PerfectionistSortImports_IsLineLength);
|
|
6633
|
+
interface _PerfectionistSortImports_IsLineLength {
|
|
6634
|
+
type: "line-length";
|
|
6635
|
+
[k: string]: unknown | undefined;
|
|
6636
|
+
}
|
|
6637
|
+
type PerfectionistSortInterfaces = [] | [
|
|
6638
|
+
{
|
|
6639
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6640
|
+
order?: ("asc" | "desc");
|
|
6641
|
+
ignoreCase?: boolean;
|
|
6642
|
+
ignorePattern?: string[];
|
|
6643
|
+
partitionByNewLine?: boolean;
|
|
6644
|
+
groupKind?: ("mixed" | "optional-first" | "required-first");
|
|
6645
|
+
groups?: (string | string[])[];
|
|
6646
|
+
customGroups?: {
|
|
6647
|
+
[k: string]: (string | string[]) | undefined;
|
|
6648
|
+
};
|
|
6649
|
+
}
|
|
6650
|
+
];
|
|
6651
|
+
type PerfectionistSortIntersectionTypes = [] | [
|
|
6652
|
+
{
|
|
6653
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6654
|
+
order?: ("asc" | "desc");
|
|
6655
|
+
ignoreCase?: boolean;
|
|
6656
|
+
groups?: (string | string[])[];
|
|
6657
|
+
}
|
|
6658
|
+
];
|
|
6659
|
+
type PerfectionistSortJsxProps = [] | [
|
|
6660
|
+
{
|
|
6661
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6662
|
+
order?: ("asc" | "desc");
|
|
6663
|
+
ignoreCase?: boolean;
|
|
6664
|
+
ignorePattern?: string[];
|
|
6665
|
+
groups?: (string | string[])[];
|
|
6666
|
+
customGroups?: {
|
|
6667
|
+
[k: string]: (string | string[]) | undefined;
|
|
6668
|
+
};
|
|
6669
|
+
}
|
|
6670
|
+
];
|
|
6671
|
+
type PerfectionistSortMaps = [] | [
|
|
6672
|
+
{
|
|
6673
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6674
|
+
order?: ("asc" | "desc");
|
|
6675
|
+
ignoreCase?: boolean;
|
|
6676
|
+
}
|
|
6677
|
+
];
|
|
6678
|
+
type PerfectionistSortNamedExports = [] | [
|
|
6679
|
+
{
|
|
6680
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6681
|
+
order?: ("asc" | "desc");
|
|
6682
|
+
ignoreCase?: boolean;
|
|
6683
|
+
groupKind?: ("mixed" | "values-first" | "types-first");
|
|
6684
|
+
}
|
|
6685
|
+
];
|
|
6686
|
+
type PerfectionistSortNamedImports = [] | [
|
|
6687
|
+
{
|
|
6688
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6689
|
+
order?: ("asc" | "desc");
|
|
6690
|
+
ignoreCase?: boolean;
|
|
6691
|
+
ignoreAlias?: boolean;
|
|
6692
|
+
groupKind?: ("mixed" | "values-first" | "types-first");
|
|
6693
|
+
}
|
|
6694
|
+
];
|
|
6695
|
+
type PerfectionistSortObjectTypes = [] | [
|
|
6696
|
+
{
|
|
6697
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6698
|
+
order?: ("asc" | "desc");
|
|
6699
|
+
ignoreCase?: boolean;
|
|
6700
|
+
partitionByNewLine?: boolean;
|
|
6701
|
+
groupKind?: ("mixed" | "required-first" | "optional-first");
|
|
6702
|
+
groups?: (string | string[])[];
|
|
6703
|
+
customGroups?: {
|
|
6704
|
+
[k: string]: (string | string[]) | undefined;
|
|
6705
|
+
};
|
|
6706
|
+
}
|
|
6707
|
+
];
|
|
6708
|
+
type PerfectionistSortObjects = [] | [
|
|
6709
|
+
{
|
|
6710
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6711
|
+
order?: ("asc" | "desc");
|
|
6712
|
+
ignoreCase?: boolean;
|
|
6713
|
+
partitionByComment?: (string[] | boolean | string);
|
|
6714
|
+
partitionByNewLine?: boolean;
|
|
6715
|
+
styledComponents?: boolean;
|
|
6716
|
+
destructureOnly?: boolean;
|
|
6717
|
+
ignorePattern?: string[];
|
|
6718
|
+
groups?: (string | string[])[];
|
|
6719
|
+
customGroups?: {
|
|
6720
|
+
[k: string]: (string | string[]) | undefined;
|
|
6721
|
+
};
|
|
6722
|
+
}
|
|
6723
|
+
];
|
|
6724
|
+
type PerfectionistSortSvelteAttributes = [] | [
|
|
6725
|
+
{
|
|
6726
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6727
|
+
order?: ("asc" | "desc");
|
|
6728
|
+
ignoreCase?: boolean;
|
|
6729
|
+
groups?: (string | string[])[];
|
|
6730
|
+
customGroups?: {
|
|
6731
|
+
[k: string]: (string | string[]) | undefined;
|
|
6732
|
+
};
|
|
6733
|
+
}
|
|
6734
|
+
];
|
|
6735
|
+
type PerfectionistSortSwitchCase = [] | [
|
|
6736
|
+
{
|
|
6737
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6738
|
+
order?: ("asc" | "desc");
|
|
6739
|
+
ignoreCase?: boolean;
|
|
6740
|
+
}
|
|
6741
|
+
];
|
|
6742
|
+
type PerfectionistSortUnionTypes = [] | [
|
|
6743
|
+
{
|
|
6744
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6745
|
+
order?: ("asc" | "desc");
|
|
6746
|
+
ignoreCase?: boolean;
|
|
6747
|
+
groups?: (string | string[])[];
|
|
6748
|
+
}
|
|
6749
|
+
];
|
|
6750
|
+
type PerfectionistSortVariableDeclarations = [] | [
|
|
6751
|
+
{
|
|
6752
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6753
|
+
order?: ("asc" | "desc");
|
|
6754
|
+
ignoreCase?: boolean;
|
|
6755
|
+
}
|
|
6756
|
+
];
|
|
6757
|
+
type PerfectionistSortVueAttributes = [] | [
|
|
6758
|
+
{
|
|
6759
|
+
type?: ("alphabetical" | "natural" | "line-length");
|
|
6760
|
+
order?: ("asc" | "desc");
|
|
6761
|
+
ignoreCase?: boolean;
|
|
6762
|
+
groups?: (string | string[])[];
|
|
6763
|
+
customGroups?: {
|
|
6764
|
+
[k: string]: (string | string[]) | undefined;
|
|
6765
|
+
};
|
|
6766
|
+
}
|
|
6767
|
+
];
|
|
6457
6768
|
type PrettierPrettier = [] | [
|
|
6458
6769
|
{
|
|
6459
6770
|
[k: string]: unknown | undefined;
|
|
@@ -8458,7 +8769,7 @@ type YmlSpacedComment = [] | [("always" | "never")] | [
|
|
|
8458
8769
|
markers?: string[];
|
|
8459
8770
|
}
|
|
8460
8771
|
];
|
|
8461
|
-
type ConfigName = 'command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/script' | 'ntnyq/js/test' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'markdown/recommended/plugin' | 'markdown/recommended/processor' | 'markdown/recommended/code-blocks' | 'ntnyq/markdown/extensions' | 'ntnyq/node' | 'ntnyq/prettier' | 'ntnyq/prettier/ignore' | 'ntnyq/regexp' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/dts' | 'ntnyq/ts/test' | 'ntnyq/ts/cjs' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
|
|
8772
|
+
type ConfigName = 'command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/script' | 'ntnyq/js/test' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'markdown/recommended/plugin' | 'markdown/recommended/processor' | 'markdown/recommended/code-blocks' | 'ntnyq/markdown/extensions' | 'ntnyq/node' | 'ntnyq/prettier' | 'ntnyq/prettier/ignore' | 'ntnyq/regexp' | 'ntnyq/perfectionist' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/dts' | 'ntnyq/ts/test' | 'ntnyq/ts/cjs' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
|
|
8462
8773
|
|
|
8463
8774
|
/**
|
|
8464
8775
|
* Parser options
|
|
@@ -8592,6 +8903,8 @@ declare const typescript: TypedConfigItem[];
|
|
|
8592
8903
|
|
|
8593
8904
|
declare const unusedImports: TypedConfigItem[];
|
|
8594
8905
|
|
|
8906
|
+
declare const perfectionist: TypedConfigItem[];
|
|
8907
|
+
|
|
8595
8908
|
declare const regexp: TypedConfigItem[];
|
|
8596
8909
|
|
|
8597
8910
|
declare const unocss: TypedConfigItem[];
|
|
@@ -8612,4 +8925,4 @@ declare const markdown: TypedConfigItem[];
|
|
|
8612
8925
|
declare function getVueVersion(): number;
|
|
8613
8926
|
declare const vue: TypedConfigItem[];
|
|
8614
8927
|
|
|
8615
|
-
export { type Arrayable, type Awaitable, type ConfigName, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type OverridesOptions, type ParserOptions, type RuleOptions, type RuleRecord, type RuleRecordEntry, type Rules, type TypedConfigItem, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, prettier, regexp, sortPackageJson, sortTsConfig, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vue, yml };
|
|
8928
|
+
export { type Arrayable, type Awaitable, type ConfigName, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type OverridesOptions, type ParserOptions, type RuleOptions, type RuleRecord, type RuleRecordEntry, type Rules, type TypedConfigItem, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, sortPackageJson, sortTsConfig, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vue, yml };
|
package/dist/index.js
CHANGED
|
@@ -135,8 +135,9 @@ import { default as default9 } from "eslint-plugin-unicorn";
|
|
|
135
135
|
import { default as default10 } from "eslint-plugin-import-x";
|
|
136
136
|
import { default as default11 } from "eslint-plugin-prettier";
|
|
137
137
|
import { default as default12 } from "eslint-plugin-markdown";
|
|
138
|
-
import { default as default13 } from "
|
|
139
|
-
import { default as default14 } from "@
|
|
138
|
+
import { default as default13 } from "eslint-plugin-perfectionist";
|
|
139
|
+
import { default as default14 } from "@antfu/eslint-plugin-unused-imports";
|
|
140
|
+
import { default as default15 } from "@eslint-community/eslint-plugin-eslint-comments";
|
|
140
141
|
import * as parserToml from "toml-eslint-parser";
|
|
141
142
|
import * as parserYaml from "yaml-eslint-parser";
|
|
142
143
|
import * as parserVue from "vue-eslint-parser";
|
|
@@ -344,10 +345,10 @@ var comments = defineConfig([
|
|
|
344
345
|
{
|
|
345
346
|
name: "ntnyq/eslint-comments",
|
|
346
347
|
plugins: {
|
|
347
|
-
"@eslint-community/eslint-comments":
|
|
348
|
+
"@eslint-community/eslint-comments": default15
|
|
348
349
|
},
|
|
349
350
|
rules: {
|
|
350
|
-
...
|
|
351
|
+
...default15.configs.recommended.rules,
|
|
351
352
|
"@eslint-community/eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }]
|
|
352
353
|
}
|
|
353
354
|
}
|
|
@@ -698,7 +699,7 @@ var unusedImports = defineConfig([
|
|
|
698
699
|
{
|
|
699
700
|
name: "ntnyq/unused-imports",
|
|
700
701
|
plugins: {
|
|
701
|
-
"unused-imports":
|
|
702
|
+
"unused-imports": default14
|
|
702
703
|
},
|
|
703
704
|
rules: {
|
|
704
705
|
"@typescript-eslint/no-unused-vars": "off",
|
|
@@ -716,6 +717,43 @@ var unusedImports = defineConfig([
|
|
|
716
717
|
}
|
|
717
718
|
]);
|
|
718
719
|
|
|
720
|
+
// src/configs/perfectionist.ts
|
|
721
|
+
var perfectionist = defineConfig([
|
|
722
|
+
{
|
|
723
|
+
name: "ntnyq/perfectionist",
|
|
724
|
+
plugins: {
|
|
725
|
+
perfectionist: default13
|
|
726
|
+
},
|
|
727
|
+
rules: {
|
|
728
|
+
"perfectionist/sort-imports": [
|
|
729
|
+
"error",
|
|
730
|
+
{
|
|
731
|
+
groups: [
|
|
732
|
+
"builtin",
|
|
733
|
+
"external",
|
|
734
|
+
"internal",
|
|
735
|
+
"internal-type",
|
|
736
|
+
"parent",
|
|
737
|
+
"parent-type",
|
|
738
|
+
"sibling",
|
|
739
|
+
"sibling-type",
|
|
740
|
+
"index",
|
|
741
|
+
"index-type",
|
|
742
|
+
"object",
|
|
743
|
+
"type",
|
|
744
|
+
"side-effect",
|
|
745
|
+
"side-effect-style"
|
|
746
|
+
],
|
|
747
|
+
internalPattern: ["~/**", "@/**", "#**"],
|
|
748
|
+
newlinesBetween: "ignore"
|
|
749
|
+
}
|
|
750
|
+
],
|
|
751
|
+
"perfectionist/sort-named-exports": ["warn", { groupKind: "values-first" }],
|
|
752
|
+
"perfectionist/sort-named-imports": ["warn", { groupKind: "values-first" }]
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
]);
|
|
756
|
+
|
|
719
757
|
// src/configs/regexp.ts
|
|
720
758
|
var regexp = defineConfig([
|
|
721
759
|
/**
|
|
@@ -1455,18 +1493,20 @@ export {
|
|
|
1455
1493
|
parserToml,
|
|
1456
1494
|
parserVue,
|
|
1457
1495
|
parserYaml,
|
|
1458
|
-
|
|
1496
|
+
perfectionist,
|
|
1497
|
+
default15 as pluginComments,
|
|
1459
1498
|
default10 as pluginImport,
|
|
1460
1499
|
default7 as pluginJsdoc,
|
|
1461
1500
|
default6 as pluginJsonc,
|
|
1462
1501
|
default12 as pluginMarkdown,
|
|
1463
1502
|
default2 as pluginNode,
|
|
1503
|
+
default13 as pluginPerfectionist,
|
|
1464
1504
|
default11 as pluginPrettier,
|
|
1465
1505
|
pluginRegexp,
|
|
1466
1506
|
default5 as pluginToml,
|
|
1467
1507
|
default9 as pluginUnicorn,
|
|
1468
1508
|
default8 as pluginUnoCSS,
|
|
1469
|
-
|
|
1509
|
+
default14 as pluginUnusedImports,
|
|
1470
1510
|
default3 as pluginVue,
|
|
1471
1511
|
default4 as pluginYaml,
|
|
1472
1512
|
prettier,
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.8.
|
|
5
|
-
"packageManager": "pnpm@9.
|
|
4
|
+
"version": "2.8.1",
|
|
5
|
+
"packageManager": "pnpm@9.7.0",
|
|
6
6
|
"description": "ESLint flat config of ntnyq",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"eslint",
|
|
@@ -57,17 +57,18 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@antfu/eslint-plugin-unused-imports": "^4.0.0",
|
|
59
59
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
|
|
60
|
-
"@eslint/js": "^9.
|
|
60
|
+
"@eslint/js": "^9.9.0",
|
|
61
61
|
"@types/eslint": "^9.6.0",
|
|
62
62
|
"@unocss/eslint-plugin": "^0.61.9",
|
|
63
63
|
"eslint-config-prettier": "^9.1.0",
|
|
64
64
|
"eslint-flat-config-utils": "^0.3.0",
|
|
65
65
|
"eslint-plugin-command": "^0.2.3",
|
|
66
66
|
"eslint-plugin-import-x": "^3.1.0",
|
|
67
|
-
"eslint-plugin-jsdoc": "^
|
|
67
|
+
"eslint-plugin-jsdoc": "^50.0.0",
|
|
68
68
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
69
69
|
"eslint-plugin-markdown": "^5.1.0",
|
|
70
|
-
"eslint-plugin-n": "^17.10.
|
|
70
|
+
"eslint-plugin-n": "^17.10.2",
|
|
71
|
+
"eslint-plugin-perfectionist": "^3.1.3",
|
|
71
72
|
"eslint-plugin-prettier": "^5.2.1",
|
|
72
73
|
"eslint-plugin-regexp": "^2.6.0",
|
|
73
74
|
"eslint-plugin-toml": "^0.11.1",
|
|
@@ -79,22 +80,22 @@
|
|
|
79
80
|
"local-pkg": "^0.5.0",
|
|
80
81
|
"prettier": "^3.3.3",
|
|
81
82
|
"toml-eslint-parser": "^0.10.0",
|
|
82
|
-
"typescript-eslint": "^8.0.
|
|
83
|
+
"typescript-eslint": "^8.0.1",
|
|
83
84
|
"vue-eslint-parser": "^9.4.3",
|
|
84
85
|
"yaml-eslint-parser": "^1.2.3"
|
|
85
86
|
},
|
|
86
87
|
"devDependencies": {
|
|
87
88
|
"@ntnyq/prettier-config": "^1.21.2",
|
|
88
|
-
"@types/node": "^20.14.
|
|
89
|
+
"@types/node": "^20.14.15",
|
|
89
90
|
"bumpp": "^9.4.2",
|
|
90
|
-
"eslint": "^9.
|
|
91
|
+
"eslint": "^9.9.0",
|
|
91
92
|
"eslint-typegen": "^0.3.0",
|
|
92
93
|
"husky": "^9.1.4",
|
|
93
94
|
"nano-staged": "^0.8.0",
|
|
94
95
|
"npm-run-all2": "^6.2.2",
|
|
95
96
|
"rimraf": "^6.0.1",
|
|
96
97
|
"tsup": "^8.2.4",
|
|
97
|
-
"tsx": "^4.
|
|
98
|
+
"tsx": "^4.17.0",
|
|
98
99
|
"typescript": "^5.5.4",
|
|
99
100
|
"zx": "^8.1.4"
|
|
100
101
|
},
|