@ntnyq/eslint-config 3.8.0 → 3.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/dist/index.cjs +30 -14
- package/dist/index.d.cts +6230 -4012
- package/dist/index.d.ts +6230 -4012
- package/dist/index.js +99 -82
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -67,10 +67,8 @@ __export(src_exports, {
|
|
|
67
67
|
antfu: () => antfu,
|
|
68
68
|
command: () => command,
|
|
69
69
|
comments: () => comments,
|
|
70
|
-
defaultSortInterfacesGroups: () => defaultSortInterfacesGroups,
|
|
71
|
-
defaultSortIntersectionTypesGroups: () => defaultSortIntersectionTypesGroups,
|
|
72
|
-
defaultSortObjectTypesGroups: () => defaultSortObjectTypesGroups,
|
|
73
70
|
defineESLintConfig: () => defineESLintConfig,
|
|
71
|
+
esX: () => esX,
|
|
74
72
|
format: () => format,
|
|
75
73
|
getOverrides: () => getOverrides,
|
|
76
74
|
githubAction: () => githubAction,
|
|
@@ -101,6 +99,7 @@ __export(src_exports, {
|
|
|
101
99
|
perfectionist: () => perfectionist,
|
|
102
100
|
pluginAntfu: () => import_eslint_plugin_antfu.default,
|
|
103
101
|
pluginComments: () => import_eslint_plugin_eslint_comments.default,
|
|
102
|
+
pluginEsX: () => import_eslint_plugin_es_x.default,
|
|
104
103
|
pluginFormat: () => import_eslint_plugin_format.default,
|
|
105
104
|
pluginGitHubAction: () => import_eslint_plugin_github_action.default,
|
|
106
105
|
pluginImportX: () => import_eslint_plugin_import_x.default,
|
|
@@ -181,6 +180,7 @@ var parserPlain = {
|
|
|
181
180
|
var pluginRegexp = __toESM(require("eslint-plugin-regexp"), 1);
|
|
182
181
|
var import_eslint_plugin_n = __toESM(require("eslint-plugin-n"), 1);
|
|
183
182
|
var import_eslint_plugin_vue = __toESM(require("eslint-plugin-vue"), 1);
|
|
183
|
+
var import_eslint_plugin_es_x = __toESM(require("eslint-plugin-es-x"), 1);
|
|
184
184
|
var import_eslint_plugin_yml = __toESM(require("eslint-plugin-yml"), 1);
|
|
185
185
|
var import_eslint_plugin_toml = __toESM(require("eslint-plugin-toml"), 1);
|
|
186
186
|
var import_eslint_plugin_ntnyq = __toESM(require("eslint-plugin-ntnyq"), 1);
|
|
@@ -405,7 +405,7 @@ var unCategorizedRules = {
|
|
|
405
405
|
"vue/next-tick-style": ["error", "promise"],
|
|
406
406
|
"vue/v-for-delimiter-style": ["error", "in"],
|
|
407
407
|
"vue/no-restricted-v-bind": ["error", "/^v-/"],
|
|
408
|
-
"vue/slot-name-casing": ["error", "
|
|
408
|
+
"vue/slot-name-casing": ["error", "kebab-case"],
|
|
409
409
|
"vue/custom-event-name-casing": ["error", "camelCase"],
|
|
410
410
|
"vue/define-props-declaration": ["error", "type-based"],
|
|
411
411
|
"vue/define-emits-declaration": ["error", "type-literal"],
|
|
@@ -684,6 +684,20 @@ var yml = (options = {}) => [
|
|
|
684
684
|
}
|
|
685
685
|
];
|
|
686
686
|
|
|
687
|
+
// src/configs/esX.ts
|
|
688
|
+
var esX = (options = {}) => [
|
|
689
|
+
{
|
|
690
|
+
name: "ntnyq/es-x",
|
|
691
|
+
plugins: {
|
|
692
|
+
"es-x": import_eslint_plugin_es_x.default
|
|
693
|
+
},
|
|
694
|
+
rules: {
|
|
695
|
+
// Overrides rules
|
|
696
|
+
...options.overrides
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
];
|
|
700
|
+
|
|
687
701
|
// src/configs/node.ts
|
|
688
702
|
var node = (options = {}) => [
|
|
689
703
|
{
|
|
@@ -2512,7 +2526,7 @@ var githubAction = (options = {}) => {
|
|
|
2512
2526
|
};
|
|
2513
2527
|
|
|
2514
2528
|
// src/configs/perfectionist.ts
|
|
2515
|
-
var
|
|
2529
|
+
var sharedGroupsForInterfaceOrObjectTypes = [
|
|
2516
2530
|
"required-property",
|
|
2517
2531
|
"optional-property",
|
|
2518
2532
|
"required-method",
|
|
@@ -2525,9 +2539,7 @@ var sharedGroups = [
|
|
|
2525
2539
|
"index-signature",
|
|
2526
2540
|
"multiline-index-signature"
|
|
2527
2541
|
];
|
|
2528
|
-
var
|
|
2529
|
-
var defaultSortObjectTypesGroups = [...sharedGroups];
|
|
2530
|
-
var defaultSortIntersectionTypesGroups = [
|
|
2542
|
+
var sharedGroupsForIntersectionOrUnion = [
|
|
2531
2543
|
/**
|
|
2532
2544
|
* eg. 'foobar', 24, false
|
|
2533
2545
|
*/
|
|
@@ -2577,6 +2589,10 @@ var defaultSortIntersectionTypesGroups = [
|
|
|
2577
2589
|
*/
|
|
2578
2590
|
"nullish"
|
|
2579
2591
|
];
|
|
2592
|
+
var defaultSortInterfacesGroups = [...sharedGroupsForInterfaceOrObjectTypes];
|
|
2593
|
+
var defaultSortObjectTypesGroups = [...sharedGroupsForInterfaceOrObjectTypes];
|
|
2594
|
+
var defaultSortIntersectionTypesGroups = [...sharedGroupsForIntersectionOrUnion];
|
|
2595
|
+
var defaultSortUnionTypesGroups = [...sharedGroupsForIntersectionOrUnion];
|
|
2580
2596
|
var perfectionist = (options = {}) => {
|
|
2581
2597
|
const {
|
|
2582
2598
|
sortEnums: enableSortEnums = true,
|
|
@@ -2726,7 +2742,7 @@ var perfectionist = (options = {}) => {
|
|
|
2726
2742
|
type: "alphabetical",
|
|
2727
2743
|
order: "asc",
|
|
2728
2744
|
partitionByComment: true,
|
|
2729
|
-
groups:
|
|
2745
|
+
groups: defaultSortIntersectionTypesGroups
|
|
2730
2746
|
}
|
|
2731
2747
|
],
|
|
2732
2748
|
"perfectionist/sort-modules": [
|
|
@@ -2743,7 +2759,7 @@ var perfectionist = (options = {}) => {
|
|
|
2743
2759
|
type: "alphabetical",
|
|
2744
2760
|
order: "asc",
|
|
2745
2761
|
partitionByComment: true,
|
|
2746
|
-
groups:
|
|
2762
|
+
groups: defaultSortObjectTypesGroups
|
|
2747
2763
|
}
|
|
2748
2764
|
],
|
|
2749
2765
|
"perfectionist/sort-union-types": [
|
|
@@ -2751,7 +2767,8 @@ var perfectionist = (options = {}) => {
|
|
|
2751
2767
|
{
|
|
2752
2768
|
type: "alphabetical",
|
|
2753
2769
|
order: "asc",
|
|
2754
|
-
partitionByComment: true
|
|
2770
|
+
partitionByComment: true,
|
|
2771
|
+
groups: defaultSortUnionTypesGroups
|
|
2755
2772
|
}
|
|
2756
2773
|
],
|
|
2757
2774
|
// Overrides rules
|
|
@@ -3071,10 +3088,8 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3071
3088
|
antfu,
|
|
3072
3089
|
command,
|
|
3073
3090
|
comments,
|
|
3074
|
-
defaultSortInterfacesGroups,
|
|
3075
|
-
defaultSortIntersectionTypesGroups,
|
|
3076
|
-
defaultSortObjectTypesGroups,
|
|
3077
3091
|
defineESLintConfig,
|
|
3092
|
+
esX,
|
|
3078
3093
|
format,
|
|
3079
3094
|
getOverrides,
|
|
3080
3095
|
githubAction,
|
|
@@ -3105,6 +3120,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3105
3120
|
perfectionist,
|
|
3106
3121
|
pluginAntfu,
|
|
3107
3122
|
pluginComments,
|
|
3123
|
+
pluginEsX,
|
|
3108
3124
|
pluginFormat,
|
|
3109
3125
|
pluginGitHubAction,
|
|
3110
3126
|
pluginImportX,
|