@sxzz/eslint-config 3.6.3 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +19 -2
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +17 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -75,6 +75,7 @@ __export(src_exports, {
|
|
|
75
75
|
pluginJsonc: () => pluginJsonc,
|
|
76
76
|
pluginMarkdown: () => pluginMarkdown,
|
|
77
77
|
pluginPrettier: () => pluginPrettier,
|
|
78
|
+
pluginSortKeys: () => pluginSortKeys,
|
|
78
79
|
pluginTypeScript: () => pluginTypeScript,
|
|
79
80
|
pluginUnicorn: () => pluginUnicorn,
|
|
80
81
|
pluginUnocss: () => pluginUnocss,
|
|
@@ -86,6 +87,7 @@ __export(src_exports, {
|
|
|
86
87
|
presetLangsExtensions: () => presetLangsExtensions,
|
|
87
88
|
prettier: () => prettier,
|
|
88
89
|
reactivityTransform: () => reactivityTransform,
|
|
90
|
+
sortKeys: () => sortKeys,
|
|
89
91
|
sortPackageJson: () => sortPackageJson,
|
|
90
92
|
sortTsconfig: () => sortTsconfig,
|
|
91
93
|
sxzz: () => sxzz,
|
|
@@ -111,6 +113,7 @@ var pluginImport = __toESM(require("eslint-plugin-i"), 1);
|
|
|
111
113
|
var pluginJsonc = __toESM(require("eslint-plugin-jsonc"), 1);
|
|
112
114
|
var pluginUnusedImports = __toESM(require("eslint-plugin-unused-imports"), 1);
|
|
113
115
|
var pluginYml = __toESM(require("eslint-plugin-yml"), 1);
|
|
116
|
+
var pluginSortKeys = __toESM(require("eslint-plugin-sort-keys"), 1);
|
|
114
117
|
var parserTypeScript = __toESM(require("@typescript-eslint/parser"), 1);
|
|
115
118
|
var parserVue = __toESM(require("vue-eslint-parser"), 1);
|
|
116
119
|
var parserYml = __toESM(require("yaml-eslint-parser"), 1);
|
|
@@ -216,7 +219,6 @@ var imports = [
|
|
|
216
219
|
},
|
|
217
220
|
rules: {
|
|
218
221
|
"antfu/import-dedupe": "error",
|
|
219
|
-
"antfu/prefer-inline-type-import": "error",
|
|
220
222
|
"import/first": "error",
|
|
221
223
|
"import/no-default-export": "error",
|
|
222
224
|
"import/no-duplicates": "error",
|
|
@@ -508,6 +510,15 @@ var prettier = [
|
|
|
508
510
|
}
|
|
509
511
|
];
|
|
510
512
|
|
|
513
|
+
// src/configs/sort-keys.ts
|
|
514
|
+
var sortKeys = [
|
|
515
|
+
{
|
|
516
|
+
plugins: {
|
|
517
|
+
"sort-keys": pluginSortKeys
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
];
|
|
521
|
+
|
|
511
522
|
// src/configs/sort.ts
|
|
512
523
|
var sortPackageJson = [
|
|
513
524
|
{
|
|
@@ -1016,15 +1027,19 @@ var basic = [
|
|
|
1016
1027
|
...typescript,
|
|
1017
1028
|
...presetLangsExtensions
|
|
1018
1029
|
];
|
|
1019
|
-
var all = [...basic, ...vue, ...unocss, ...prettier];
|
|
1030
|
+
var all = [...basic, ...sortKeys, ...vue, ...unocss, ...prettier];
|
|
1020
1031
|
function sxzz(config = [], {
|
|
1021
1032
|
vue: enableVue = true,
|
|
1022
1033
|
prettier: enablePrettier = true,
|
|
1023
1034
|
markdown: enableMarkdown = true,
|
|
1035
|
+
sortKeys: enableSortKeys = true,
|
|
1024
1036
|
unocss: enableUnocss = false
|
|
1025
1037
|
} = {}) {
|
|
1026
1038
|
const configs = [];
|
|
1027
1039
|
configs.push(...basic);
|
|
1040
|
+
if (enableSortKeys) {
|
|
1041
|
+
configs.push(...sortKeys);
|
|
1042
|
+
}
|
|
1028
1043
|
if (enableVue) {
|
|
1029
1044
|
configs.push(...vue);
|
|
1030
1045
|
}
|
|
@@ -1089,6 +1104,7 @@ function sxzz(config = [], {
|
|
|
1089
1104
|
pluginJsonc,
|
|
1090
1105
|
pluginMarkdown,
|
|
1091
1106
|
pluginPrettier,
|
|
1107
|
+
pluginSortKeys,
|
|
1092
1108
|
pluginTypeScript,
|
|
1093
1109
|
pluginUnicorn,
|
|
1094
1110
|
pluginUnocss,
|
|
@@ -1100,6 +1116,7 @@ function sxzz(config = [], {
|
|
|
1100
1116
|
presetLangsExtensions,
|
|
1101
1117
|
prettier,
|
|
1102
1118
|
reactivityTransform,
|
|
1119
|
+
sortKeys,
|
|
1103
1120
|
sortPackageJson,
|
|
1104
1121
|
sortTsconfig,
|
|
1105
1122
|
sxzz,
|
package/dist/index.d.cts
CHANGED
|
@@ -7,6 +7,8 @@ import * as eslintPluginUnusedImports from 'eslint-plugin-unused-imports';
|
|
|
7
7
|
export { eslintPluginUnusedImports as pluginUnusedImports };
|
|
8
8
|
import * as eslintPluginYml from 'eslint-plugin-yml';
|
|
9
9
|
export { eslintPluginYml as pluginYml };
|
|
10
|
+
import * as eslintPluginSortKeys from 'eslint-plugin-sort-keys';
|
|
11
|
+
export { eslintPluginSortKeys as pluginSortKeys };
|
|
10
12
|
import * as parser from '@typescript-eslint/parser';
|
|
11
13
|
export { parser as parserTypeScript };
|
|
12
14
|
import * as vueEslintParser from 'vue-eslint-parser';
|
|
@@ -30,6 +32,8 @@ declare const markdown: FlatESLintConfigItem[];
|
|
|
30
32
|
|
|
31
33
|
declare const prettier: FlatESLintConfigItem[];
|
|
32
34
|
|
|
35
|
+
declare const sortKeys: FlatESLintConfigItem[];
|
|
36
|
+
|
|
33
37
|
declare const sortPackageJson: FlatESLintConfigItem[];
|
|
34
38
|
declare const sortTsconfig: FlatESLintConfigItem[];
|
|
35
39
|
|
|
@@ -87,11 +91,12 @@ declare const presetLangsExtensions: FlatESLintConfigItem[];
|
|
|
87
91
|
declare const basic: FlatESLintConfigItem[];
|
|
88
92
|
|
|
89
93
|
declare const all: FlatESLintConfigItem[];
|
|
90
|
-
declare function sxzz(config?: FlatESLintConfigItem | FlatESLintConfigItem[], { vue: enableVue, prettier: enablePrettier, markdown: enableMarkdown, unocss: enableUnocss, }?: Partial<{
|
|
94
|
+
declare function sxzz(config?: FlatESLintConfigItem | FlatESLintConfigItem[], { vue: enableVue, prettier: enablePrettier, markdown: enableMarkdown, sortKeys: enableSortKeys, unocss: enableUnocss, }?: Partial<{
|
|
91
95
|
vue: boolean;
|
|
92
96
|
prettier: boolean;
|
|
93
97
|
markdown: boolean;
|
|
94
98
|
unocss: boolean;
|
|
99
|
+
sortKeys: boolean;
|
|
95
100
|
}>): FlatESLintConfigItem[];
|
|
96
101
|
|
|
97
|
-
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, 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_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, all, basic, comments, configPrettier, getVueVersion, hasTypeScript, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetLangsExtensions, prettier, reactivityTransform, sortPackageJson, sortTsconfig, sxzz, typescript, unicorn, unocss, vue, yml };
|
|
102
|
+
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, 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_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, all, basic, comments, configPrettier, getVueVersion, hasTypeScript, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetLangsExtensions, prettier, reactivityTransform, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, unicorn, unocss, vue, yml };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ import * as eslintPluginUnusedImports from 'eslint-plugin-unused-imports';
|
|
|
7
7
|
export { eslintPluginUnusedImports as pluginUnusedImports };
|
|
8
8
|
import * as eslintPluginYml from 'eslint-plugin-yml';
|
|
9
9
|
export { eslintPluginYml as pluginYml };
|
|
10
|
+
import * as eslintPluginSortKeys from 'eslint-plugin-sort-keys';
|
|
11
|
+
export { eslintPluginSortKeys as pluginSortKeys };
|
|
10
12
|
import * as parser from '@typescript-eslint/parser';
|
|
11
13
|
export { parser as parserTypeScript };
|
|
12
14
|
import * as vueEslintParser from 'vue-eslint-parser';
|
|
@@ -30,6 +32,8 @@ declare const markdown: FlatESLintConfigItem[];
|
|
|
30
32
|
|
|
31
33
|
declare const prettier: FlatESLintConfigItem[];
|
|
32
34
|
|
|
35
|
+
declare const sortKeys: FlatESLintConfigItem[];
|
|
36
|
+
|
|
33
37
|
declare const sortPackageJson: FlatESLintConfigItem[];
|
|
34
38
|
declare const sortTsconfig: FlatESLintConfigItem[];
|
|
35
39
|
|
|
@@ -87,11 +91,12 @@ declare const presetLangsExtensions: FlatESLintConfigItem[];
|
|
|
87
91
|
declare const basic: FlatESLintConfigItem[];
|
|
88
92
|
|
|
89
93
|
declare const all: FlatESLintConfigItem[];
|
|
90
|
-
declare function sxzz(config?: FlatESLintConfigItem | FlatESLintConfigItem[], { vue: enableVue, prettier: enablePrettier, markdown: enableMarkdown, unocss: enableUnocss, }?: Partial<{
|
|
94
|
+
declare function sxzz(config?: FlatESLintConfigItem | FlatESLintConfigItem[], { vue: enableVue, prettier: enablePrettier, markdown: enableMarkdown, sortKeys: enableSortKeys, unocss: enableUnocss, }?: Partial<{
|
|
91
95
|
vue: boolean;
|
|
92
96
|
prettier: boolean;
|
|
93
97
|
markdown: boolean;
|
|
94
98
|
unocss: boolean;
|
|
99
|
+
sortKeys: boolean;
|
|
95
100
|
}>): FlatESLintConfigItem[];
|
|
96
101
|
|
|
97
|
-
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, 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_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, all, basic, comments, configPrettier, getVueVersion, hasTypeScript, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetLangsExtensions, prettier, reactivityTransform, sortPackageJson, sortTsconfig, sxzz, typescript, unicorn, unocss, vue, yml };
|
|
102
|
+
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, 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_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, all, basic, comments, configPrettier, getVueVersion, hasTypeScript, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetLangsExtensions, prettier, reactivityTransform, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, unicorn, unocss, vue, yml };
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import * as pluginImport from "eslint-plugin-i";
|
|
|
12
12
|
import * as pluginJsonc from "eslint-plugin-jsonc";
|
|
13
13
|
import * as pluginUnusedImports from "eslint-plugin-unused-imports";
|
|
14
14
|
import * as pluginYml from "eslint-plugin-yml";
|
|
15
|
+
import * as pluginSortKeys from "eslint-plugin-sort-keys";
|
|
15
16
|
import * as parserTypeScript from "@typescript-eslint/parser";
|
|
16
17
|
import * as parserVue from "vue-eslint-parser";
|
|
17
18
|
import * as parserYml from "yaml-eslint-parser";
|
|
@@ -117,7 +118,6 @@ var imports = [
|
|
|
117
118
|
},
|
|
118
119
|
rules: {
|
|
119
120
|
"antfu/import-dedupe": "error",
|
|
120
|
-
"antfu/prefer-inline-type-import": "error",
|
|
121
121
|
"import/first": "error",
|
|
122
122
|
"import/no-default-export": "error",
|
|
123
123
|
"import/no-duplicates": "error",
|
|
@@ -409,6 +409,15 @@ var prettier = [
|
|
|
409
409
|
}
|
|
410
410
|
];
|
|
411
411
|
|
|
412
|
+
// src/configs/sort-keys.ts
|
|
413
|
+
var sortKeys = [
|
|
414
|
+
{
|
|
415
|
+
plugins: {
|
|
416
|
+
"sort-keys": pluginSortKeys
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
];
|
|
420
|
+
|
|
412
421
|
// src/configs/sort.ts
|
|
413
422
|
var sortPackageJson = [
|
|
414
423
|
{
|
|
@@ -917,15 +926,19 @@ var basic = [
|
|
|
917
926
|
...typescript,
|
|
918
927
|
...presetLangsExtensions
|
|
919
928
|
];
|
|
920
|
-
var all = [...basic, ...vue, ...unocss, ...prettier];
|
|
929
|
+
var all = [...basic, ...sortKeys, ...vue, ...unocss, ...prettier];
|
|
921
930
|
function sxzz(config = [], {
|
|
922
931
|
vue: enableVue = true,
|
|
923
932
|
prettier: enablePrettier = true,
|
|
924
933
|
markdown: enableMarkdown = true,
|
|
934
|
+
sortKeys: enableSortKeys = true,
|
|
925
935
|
unocss: enableUnocss = false
|
|
926
936
|
} = {}) {
|
|
927
937
|
const configs = [];
|
|
928
938
|
configs.push(...basic);
|
|
939
|
+
if (enableSortKeys) {
|
|
940
|
+
configs.push(...sortKeys);
|
|
941
|
+
}
|
|
929
942
|
if (enableVue) {
|
|
930
943
|
configs.push(...vue);
|
|
931
944
|
}
|
|
@@ -989,6 +1002,7 @@ export {
|
|
|
989
1002
|
pluginJsonc,
|
|
990
1003
|
pluginMarkdown,
|
|
991
1004
|
pluginPrettier,
|
|
1005
|
+
pluginSortKeys,
|
|
992
1006
|
pluginTypeScript,
|
|
993
1007
|
pluginUnicorn,
|
|
994
1008
|
pluginUnocss,
|
|
@@ -1000,6 +1014,7 @@ export {
|
|
|
1000
1014
|
presetLangsExtensions,
|
|
1001
1015
|
prettier,
|
|
1002
1016
|
reactivityTransform,
|
|
1017
|
+
sortKeys,
|
|
1003
1018
|
sortPackageJson,
|
|
1004
1019
|
sortTsconfig,
|
|
1005
1020
|
sxzz,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sxzz/eslint-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"packageManager": "pnpm@8.8.0",
|
|
5
5
|
"description": "ESLint config for @sxzz.",
|
|
6
6
|
"type": "module",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"eslint-plugin-jsonc": "^2.10.0",
|
|
43
43
|
"eslint-plugin-markdown": "^3.0.1",
|
|
44
44
|
"eslint-plugin-prettier": "^5.0.0",
|
|
45
|
+
"eslint-plugin-sort-keys": "^2.3.5",
|
|
45
46
|
"eslint-plugin-unicorn": "^48.0.1",
|
|
46
47
|
"eslint-plugin-unused-imports": "^3.0.0",
|
|
47
48
|
"eslint-plugin-vue": "^9.17.0",
|
|
@@ -58,7 +59,6 @@
|
|
|
58
59
|
"@types/node": "^20.8.4",
|
|
59
60
|
"bumpp": "^9.2.0",
|
|
60
61
|
"eslint": "^8.51.0",
|
|
61
|
-
"eslint-plugin-sort-keys": "^2.3.5",
|
|
62
62
|
"sucrase": "^3.34.0",
|
|
63
63
|
"tsup": "^7.2.0",
|
|
64
64
|
"typescript": "^5.2.2"
|