@cuiqg/eslint-config 2.1.25 → 2.1.26
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 +36 -11
- package/dist/index.js +34 -11
- package/package.json +3 -1
package/dist/index.cjs
CHANGED
|
@@ -43,6 +43,7 @@ __export(index_exports, {
|
|
|
43
43
|
GLOB_SRC: () => GLOB_SRC,
|
|
44
44
|
GLOB_SRC_EXT: () => GLOB_SRC_EXT,
|
|
45
45
|
GLOB_STYLE: () => GLOB_STYLE,
|
|
46
|
+
GLOB_TOML: () => GLOB_TOML,
|
|
46
47
|
GLOB_VUE: () => GLOB_VUE,
|
|
47
48
|
GLOB_XML: () => GLOB_XML,
|
|
48
49
|
GLOB_YAML: () => GLOB_YAML,
|
|
@@ -68,6 +69,7 @@ __export(index_exports, {
|
|
|
68
69
|
sortJsconfig: () => sortJsconfig,
|
|
69
70
|
sortPackageJson: () => sortPackageJson,
|
|
70
71
|
stylistic: () => stylistic,
|
|
72
|
+
toml: () => toml,
|
|
71
73
|
unicorn: () => unicorn,
|
|
72
74
|
unocss: () => unocss,
|
|
73
75
|
vue: () => vue,
|
|
@@ -119,6 +121,7 @@ var GLOB_VUE = "**/*.vue";
|
|
|
119
121
|
var GLOB_YAML = "**/*.y?(a)ml";
|
|
120
122
|
var GLOB_XML = "**/*.xml";
|
|
121
123
|
var GLOB_HTML = "**/*.htm?(l)";
|
|
124
|
+
var GLOB_TOML = "**/*.toml";
|
|
122
125
|
var GLOB_EXCLUDE = [
|
|
123
126
|
"**/node_modules",
|
|
124
127
|
"**/dist",
|
|
@@ -200,6 +203,7 @@ var hasUnocss = (0, import_local_pkg.isPackageExists)("unocss") || (0, import_lo
|
|
|
200
203
|
async function javascript() {
|
|
201
204
|
return [
|
|
202
205
|
{
|
|
206
|
+
name: "cuiqg/javascript",
|
|
203
207
|
languageOptions: {
|
|
204
208
|
ecmaVersion: 2022,
|
|
205
209
|
globals: {
|
|
@@ -222,7 +226,6 @@ async function javascript() {
|
|
|
222
226
|
linterOptions: {
|
|
223
227
|
reportUnusedDisableDirectives: true
|
|
224
228
|
},
|
|
225
|
-
name: "cuiqg/javascript",
|
|
226
229
|
rules: {
|
|
227
230
|
"accessor-pairs": ["error", { enforceForClassMembers: true, setWithoutGet: true }],
|
|
228
231
|
"array-callback-return": "error",
|
|
@@ -380,14 +383,16 @@ async function javascript() {
|
|
|
380
383
|
// src/configs/jsdoc.js
|
|
381
384
|
async function jsdoc() {
|
|
382
385
|
const pluginJsdoc = await interopDefault(import("eslint-plugin-jsdoc"));
|
|
386
|
+
const files = [GLOB_JS];
|
|
383
387
|
return [
|
|
384
388
|
{
|
|
389
|
+
files,
|
|
385
390
|
name: "cuiqg/jsdoc",
|
|
386
391
|
plugins: {
|
|
387
392
|
jsdoc: pluginJsdoc
|
|
388
393
|
},
|
|
389
394
|
rules: {
|
|
390
|
-
...pluginJsdoc.configs
|
|
395
|
+
...pluginJsdoc.configs["flat/recommended"].rules
|
|
391
396
|
}
|
|
392
397
|
}
|
|
393
398
|
];
|
|
@@ -994,15 +999,8 @@ async function yaml() {
|
|
|
994
999
|
parser: parserYaml
|
|
995
1000
|
},
|
|
996
1001
|
rules: {
|
|
997
|
-
...pluginYaml.configs.
|
|
998
|
-
...pluginYaml.configs.prettier.rules
|
|
999
|
-
"yaml/block-mapping": "error",
|
|
1000
|
-
"yaml/block-sequence": "error",
|
|
1001
|
-
"yaml/no-empty-key": "error",
|
|
1002
|
-
"yaml/no-empty-sequence-entry": "error",
|
|
1003
|
-
"yaml/no-irregular-whitespace": "error",
|
|
1004
|
-
"yaml/plain-scalar": "error",
|
|
1005
|
-
"yaml/vue-custom-block/no-parsing-error": "error"
|
|
1002
|
+
...pluginYaml.configs.recommended.rules,
|
|
1003
|
+
...pluginYaml.configs.prettier.rules
|
|
1006
1004
|
}
|
|
1007
1005
|
}
|
|
1008
1006
|
];
|
|
@@ -1032,6 +1030,30 @@ async function disables() {
|
|
|
1032
1030
|
];
|
|
1033
1031
|
}
|
|
1034
1032
|
|
|
1033
|
+
// src/configs/toml.js
|
|
1034
|
+
async function toml() {
|
|
1035
|
+
const files = [GLOB_TOML];
|
|
1036
|
+
const [pluginToml, parserToml] = await Promise.all([
|
|
1037
|
+
interopDefault(import("eslint-plugin-toml")),
|
|
1038
|
+
interopDefault(import("toml-eslint-parser"))
|
|
1039
|
+
]);
|
|
1040
|
+
return [
|
|
1041
|
+
{
|
|
1042
|
+
name: "cuiqg/toml",
|
|
1043
|
+
files,
|
|
1044
|
+
plugins: {
|
|
1045
|
+
toml: pluginToml
|
|
1046
|
+
},
|
|
1047
|
+
languageOptions: {
|
|
1048
|
+
parser: parserToml
|
|
1049
|
+
},
|
|
1050
|
+
rules: {
|
|
1051
|
+
...pluginToml.configs.recommended.rules
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
];
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1035
1057
|
// src/presets.js
|
|
1036
1058
|
var defaultPluginRenaming = {
|
|
1037
1059
|
"@stylistic": "style",
|
|
@@ -1062,6 +1084,7 @@ function cuiqg(options = {}, ...userConfigs) {
|
|
|
1062
1084
|
sortPackageJson(),
|
|
1063
1085
|
sortJsconfig(),
|
|
1064
1086
|
yaml(),
|
|
1087
|
+
toml(),
|
|
1065
1088
|
disables()
|
|
1066
1089
|
);
|
|
1067
1090
|
if (enableGitignore) {
|
|
@@ -1115,6 +1138,7 @@ var index_default = cuiqg;
|
|
|
1115
1138
|
GLOB_SRC,
|
|
1116
1139
|
GLOB_SRC_EXT,
|
|
1117
1140
|
GLOB_STYLE,
|
|
1141
|
+
GLOB_TOML,
|
|
1118
1142
|
GLOB_VUE,
|
|
1119
1143
|
GLOB_XML,
|
|
1120
1144
|
GLOB_YAML,
|
|
@@ -1139,6 +1163,7 @@ var index_default = cuiqg;
|
|
|
1139
1163
|
sortJsconfig,
|
|
1140
1164
|
sortPackageJson,
|
|
1141
1165
|
stylistic,
|
|
1166
|
+
toml,
|
|
1142
1167
|
unicorn,
|
|
1143
1168
|
unocss,
|
|
1144
1169
|
vue,
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,7 @@ var GLOB_VUE = "**/*.vue";
|
|
|
42
42
|
var GLOB_YAML = "**/*.y?(a)ml";
|
|
43
43
|
var GLOB_XML = "**/*.xml";
|
|
44
44
|
var GLOB_HTML = "**/*.htm?(l)";
|
|
45
|
+
var GLOB_TOML = "**/*.toml";
|
|
45
46
|
var GLOB_EXCLUDE = [
|
|
46
47
|
"**/node_modules",
|
|
47
48
|
"**/dist",
|
|
@@ -123,6 +124,7 @@ var hasUnocss = isPackageExists("unocss") || isPackageExists("@unocss/webpack")
|
|
|
123
124
|
async function javascript() {
|
|
124
125
|
return [
|
|
125
126
|
{
|
|
127
|
+
name: "cuiqg/javascript",
|
|
126
128
|
languageOptions: {
|
|
127
129
|
ecmaVersion: 2022,
|
|
128
130
|
globals: {
|
|
@@ -145,7 +147,6 @@ async function javascript() {
|
|
|
145
147
|
linterOptions: {
|
|
146
148
|
reportUnusedDisableDirectives: true
|
|
147
149
|
},
|
|
148
|
-
name: "cuiqg/javascript",
|
|
149
150
|
rules: {
|
|
150
151
|
"accessor-pairs": ["error", { enforceForClassMembers: true, setWithoutGet: true }],
|
|
151
152
|
"array-callback-return": "error",
|
|
@@ -303,14 +304,16 @@ async function javascript() {
|
|
|
303
304
|
// src/configs/jsdoc.js
|
|
304
305
|
async function jsdoc() {
|
|
305
306
|
const pluginJsdoc = await interopDefault(import("eslint-plugin-jsdoc"));
|
|
307
|
+
const files = [GLOB_JS];
|
|
306
308
|
return [
|
|
307
309
|
{
|
|
310
|
+
files,
|
|
308
311
|
name: "cuiqg/jsdoc",
|
|
309
312
|
plugins: {
|
|
310
313
|
jsdoc: pluginJsdoc
|
|
311
314
|
},
|
|
312
315
|
rules: {
|
|
313
|
-
...pluginJsdoc.configs
|
|
316
|
+
...pluginJsdoc.configs["flat/recommended"].rules
|
|
314
317
|
}
|
|
315
318
|
}
|
|
316
319
|
];
|
|
@@ -917,15 +920,8 @@ async function yaml() {
|
|
|
917
920
|
parser: parserYaml
|
|
918
921
|
},
|
|
919
922
|
rules: {
|
|
920
|
-
...pluginYaml.configs.
|
|
921
|
-
...pluginYaml.configs.prettier.rules
|
|
922
|
-
"yaml/block-mapping": "error",
|
|
923
|
-
"yaml/block-sequence": "error",
|
|
924
|
-
"yaml/no-empty-key": "error",
|
|
925
|
-
"yaml/no-empty-sequence-entry": "error",
|
|
926
|
-
"yaml/no-irregular-whitespace": "error",
|
|
927
|
-
"yaml/plain-scalar": "error",
|
|
928
|
-
"yaml/vue-custom-block/no-parsing-error": "error"
|
|
923
|
+
...pluginYaml.configs.recommended.rules,
|
|
924
|
+
...pluginYaml.configs.prettier.rules
|
|
929
925
|
}
|
|
930
926
|
}
|
|
931
927
|
];
|
|
@@ -955,6 +951,30 @@ async function disables() {
|
|
|
955
951
|
];
|
|
956
952
|
}
|
|
957
953
|
|
|
954
|
+
// src/configs/toml.js
|
|
955
|
+
async function toml() {
|
|
956
|
+
const files = [GLOB_TOML];
|
|
957
|
+
const [pluginToml, parserToml] = await Promise.all([
|
|
958
|
+
interopDefault(import("eslint-plugin-toml")),
|
|
959
|
+
interopDefault(import("toml-eslint-parser"))
|
|
960
|
+
]);
|
|
961
|
+
return [
|
|
962
|
+
{
|
|
963
|
+
name: "cuiqg/toml",
|
|
964
|
+
files,
|
|
965
|
+
plugins: {
|
|
966
|
+
toml: pluginToml
|
|
967
|
+
},
|
|
968
|
+
languageOptions: {
|
|
969
|
+
parser: parserToml
|
|
970
|
+
},
|
|
971
|
+
rules: {
|
|
972
|
+
...pluginToml.configs.recommended.rules
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
];
|
|
976
|
+
}
|
|
977
|
+
|
|
958
978
|
// src/presets.js
|
|
959
979
|
var defaultPluginRenaming = {
|
|
960
980
|
"@stylistic": "style",
|
|
@@ -985,6 +1005,7 @@ function cuiqg(options = {}, ...userConfigs) {
|
|
|
985
1005
|
sortPackageJson(),
|
|
986
1006
|
sortJsconfig(),
|
|
987
1007
|
yaml(),
|
|
1008
|
+
toml(),
|
|
988
1009
|
disables()
|
|
989
1010
|
);
|
|
990
1011
|
if (enableGitignore) {
|
|
@@ -1037,6 +1058,7 @@ export {
|
|
|
1037
1058
|
GLOB_SRC,
|
|
1038
1059
|
GLOB_SRC_EXT,
|
|
1039
1060
|
GLOB_STYLE,
|
|
1061
|
+
GLOB_TOML,
|
|
1040
1062
|
GLOB_VUE,
|
|
1041
1063
|
GLOB_XML,
|
|
1042
1064
|
GLOB_YAML,
|
|
@@ -1062,6 +1084,7 @@ export {
|
|
|
1062
1084
|
sortJsconfig,
|
|
1063
1085
|
sortPackageJson,
|
|
1064
1086
|
stylistic,
|
|
1087
|
+
toml,
|
|
1065
1088
|
unicorn,
|
|
1066
1089
|
unocss,
|
|
1067
1090
|
vue,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cuiqg/eslint-config",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.26",
|
|
4
4
|
"description": "ESLint config preset for @cuiqg",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -45,12 +45,14 @@
|
|
|
45
45
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
46
46
|
"eslint-plugin-n": "^17.11.1",
|
|
47
47
|
"eslint-plugin-prettier": "^5.2.1",
|
|
48
|
+
"eslint-plugin-toml": "^0.12.0",
|
|
48
49
|
"eslint-plugin-unicorn": "^56.0.0",
|
|
49
50
|
"eslint-plugin-vue": "^9.29.1",
|
|
50
51
|
"eslint-plugin-yml": "^1.14.0",
|
|
51
52
|
"globals": "^15.11.0",
|
|
52
53
|
"jsonc-eslint-parser": "^2.4.0",
|
|
53
54
|
"local-pkg": "^0.5.0",
|
|
55
|
+
"toml-eslint-parser": "^0.10.0",
|
|
54
56
|
"unconfig": "^0.6.0",
|
|
55
57
|
"vue-eslint-parser": "^9.4.3",
|
|
56
58
|
"yaml-eslint-parser": "^1.2.3"
|