@sxzz/eslint-config 3.6.4 → 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 -1
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +17 -1
- 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);
|
|
@@ -507,6 +510,15 @@ var prettier = [
|
|
|
507
510
|
}
|
|
508
511
|
];
|
|
509
512
|
|
|
513
|
+
// src/configs/sort-keys.ts
|
|
514
|
+
var sortKeys = [
|
|
515
|
+
{
|
|
516
|
+
plugins: {
|
|
517
|
+
"sort-keys": pluginSortKeys
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
];
|
|
521
|
+
|
|
510
522
|
// src/configs/sort.ts
|
|
511
523
|
var sortPackageJson = [
|
|
512
524
|
{
|
|
@@ -1015,15 +1027,19 @@ var basic = [
|
|
|
1015
1027
|
...typescript,
|
|
1016
1028
|
...presetLangsExtensions
|
|
1017
1029
|
];
|
|
1018
|
-
var all = [...basic, ...vue, ...unocss, ...prettier];
|
|
1030
|
+
var all = [...basic, ...sortKeys, ...vue, ...unocss, ...prettier];
|
|
1019
1031
|
function sxzz(config = [], {
|
|
1020
1032
|
vue: enableVue = true,
|
|
1021
1033
|
prettier: enablePrettier = true,
|
|
1022
1034
|
markdown: enableMarkdown = true,
|
|
1035
|
+
sortKeys: enableSortKeys = true,
|
|
1023
1036
|
unocss: enableUnocss = false
|
|
1024
1037
|
} = {}) {
|
|
1025
1038
|
const configs = [];
|
|
1026
1039
|
configs.push(...basic);
|
|
1040
|
+
if (enableSortKeys) {
|
|
1041
|
+
configs.push(...sortKeys);
|
|
1042
|
+
}
|
|
1027
1043
|
if (enableVue) {
|
|
1028
1044
|
configs.push(...vue);
|
|
1029
1045
|
}
|
|
@@ -1088,6 +1104,7 @@ function sxzz(config = [], {
|
|
|
1088
1104
|
pluginJsonc,
|
|
1089
1105
|
pluginMarkdown,
|
|
1090
1106
|
pluginPrettier,
|
|
1107
|
+
pluginSortKeys,
|
|
1091
1108
|
pluginTypeScript,
|
|
1092
1109
|
pluginUnicorn,
|
|
1093
1110
|
pluginUnocss,
|
|
@@ -1099,6 +1116,7 @@ function sxzz(config = [], {
|
|
|
1099
1116
|
presetLangsExtensions,
|
|
1100
1117
|
prettier,
|
|
1101
1118
|
reactivityTransform,
|
|
1119
|
+
sortKeys,
|
|
1102
1120
|
sortPackageJson,
|
|
1103
1121
|
sortTsconfig,
|
|
1104
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";
|
|
@@ -408,6 +409,15 @@ var prettier = [
|
|
|
408
409
|
}
|
|
409
410
|
];
|
|
410
411
|
|
|
412
|
+
// src/configs/sort-keys.ts
|
|
413
|
+
var sortKeys = [
|
|
414
|
+
{
|
|
415
|
+
plugins: {
|
|
416
|
+
"sort-keys": pluginSortKeys
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
];
|
|
420
|
+
|
|
411
421
|
// src/configs/sort.ts
|
|
412
422
|
var sortPackageJson = [
|
|
413
423
|
{
|
|
@@ -916,15 +926,19 @@ var basic = [
|
|
|
916
926
|
...typescript,
|
|
917
927
|
...presetLangsExtensions
|
|
918
928
|
];
|
|
919
|
-
var all = [...basic, ...vue, ...unocss, ...prettier];
|
|
929
|
+
var all = [...basic, ...sortKeys, ...vue, ...unocss, ...prettier];
|
|
920
930
|
function sxzz(config = [], {
|
|
921
931
|
vue: enableVue = true,
|
|
922
932
|
prettier: enablePrettier = true,
|
|
923
933
|
markdown: enableMarkdown = true,
|
|
934
|
+
sortKeys: enableSortKeys = true,
|
|
924
935
|
unocss: enableUnocss = false
|
|
925
936
|
} = {}) {
|
|
926
937
|
const configs = [];
|
|
927
938
|
configs.push(...basic);
|
|
939
|
+
if (enableSortKeys) {
|
|
940
|
+
configs.push(...sortKeys);
|
|
941
|
+
}
|
|
928
942
|
if (enableVue) {
|
|
929
943
|
configs.push(...vue);
|
|
930
944
|
}
|
|
@@ -988,6 +1002,7 @@ export {
|
|
|
988
1002
|
pluginJsonc,
|
|
989
1003
|
pluginMarkdown,
|
|
990
1004
|
pluginPrettier,
|
|
1005
|
+
pluginSortKeys,
|
|
991
1006
|
pluginTypeScript,
|
|
992
1007
|
pluginUnicorn,
|
|
993
1008
|
pluginUnocss,
|
|
@@ -999,6 +1014,7 @@ export {
|
|
|
999
1014
|
presetLangsExtensions,
|
|
1000
1015
|
prettier,
|
|
1001
1016
|
reactivityTransform,
|
|
1017
|
+
sortKeys,
|
|
1002
1018
|
sortPackageJson,
|
|
1003
1019
|
sortTsconfig,
|
|
1004
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"
|