@cuiqg/eslint-config 2.1.26 → 2.1.27
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 +29 -4
- package/dist/index.js +27 -4
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -54,6 +54,7 @@ __export(index_exports, {
|
|
|
54
54
|
defaultPluginRenaming: () => defaultPluginRenaming,
|
|
55
55
|
disables: () => disables,
|
|
56
56
|
gitignore: () => gitignore,
|
|
57
|
+
hasTailwindcss: () => hasTailwindcss,
|
|
57
58
|
hasUnocss: () => hasUnocss,
|
|
58
59
|
hasVue: () => hasVue,
|
|
59
60
|
ignores: () => ignores,
|
|
@@ -69,6 +70,7 @@ __export(index_exports, {
|
|
|
69
70
|
sortJsconfig: () => sortJsconfig,
|
|
70
71
|
sortPackageJson: () => sortPackageJson,
|
|
71
72
|
stylistic: () => stylistic,
|
|
73
|
+
tailwindcss: () => tailwindcss,
|
|
72
74
|
toml: () => toml,
|
|
73
75
|
unicorn: () => unicorn,
|
|
74
76
|
unocss: () => unocss,
|
|
@@ -198,6 +200,7 @@ var import_local_pkg = require("local-pkg");
|
|
|
198
200
|
var isInEditor = !!((import_node_process.default.env.VSCODE_PID || import_node_process.default.env.VSCODE_CWD || import_node_process.default.env.JETBRAINS_IDE || import_node_process.default.env.VIM) && !import_node_process.default.env.CI);
|
|
199
201
|
var hasVue = (0, import_local_pkg.isPackageExists)("vue") || (0, import_local_pkg.isPackageExists)("nuxt") || (0, import_local_pkg.isPackageExists)("vitepress") || (0, import_local_pkg.isPackageExists)("@slidev/cli");
|
|
200
202
|
var hasUnocss = (0, import_local_pkg.isPackageExists)("unocss") || (0, import_local_pkg.isPackageExists)("@unocss/webpack") || (0, import_local_pkg.isPackageExists)("@unocss/nuxt");
|
|
203
|
+
var hasTailwindcss = (0, import_local_pkg.isPackageExists)("tailwindcss");
|
|
201
204
|
|
|
202
205
|
// src/configs/javascript.js
|
|
203
206
|
async function javascript() {
|
|
@@ -494,10 +497,9 @@ async function macros() {
|
|
|
494
497
|
|
|
495
498
|
// src/configs/prettier.js
|
|
496
499
|
async function prettier() {
|
|
497
|
-
const [pluginJsonc, pluginPrettier
|
|
500
|
+
const [pluginJsonc, pluginPrettier] = await Promise.all([
|
|
498
501
|
interopDefault(import("eslint-plugin-jsonc")),
|
|
499
|
-
interopDefault(import("eslint-plugin-prettier"))
|
|
500
|
-
interopDefault(import("eslint-config-prettier"))
|
|
502
|
+
interopDefault(import("eslint-plugin-prettier"))
|
|
501
503
|
]);
|
|
502
504
|
return [
|
|
503
505
|
{
|
|
@@ -506,7 +508,6 @@ async function prettier() {
|
|
|
506
508
|
prettier: pluginPrettier
|
|
507
509
|
},
|
|
508
510
|
rules: {
|
|
509
|
-
...configPrettier.rules,
|
|
510
511
|
...pluginPrettier.configs.recommended.rules,
|
|
511
512
|
...pluginJsonc.configs.prettier.rules,
|
|
512
513
|
"prettier/prettier": "warn"
|
|
@@ -1054,6 +1055,22 @@ async function toml() {
|
|
|
1054
1055
|
];
|
|
1055
1056
|
}
|
|
1056
1057
|
|
|
1058
|
+
// src/configs/tailwindcss.js
|
|
1059
|
+
async function tailwindcss() {
|
|
1060
|
+
const pluginTailwindcss = await interopDefault(import("eslint-plugin-tailwindcss"));
|
|
1061
|
+
return [
|
|
1062
|
+
{
|
|
1063
|
+
name: "cuiqg/tailwindcss",
|
|
1064
|
+
plugins: {
|
|
1065
|
+
tailwindcss: pluginTailwindcss
|
|
1066
|
+
},
|
|
1067
|
+
rules: {
|
|
1068
|
+
...pluginTailwindcss.configs.recommended.rules
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
];
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1057
1074
|
// src/presets.js
|
|
1058
1075
|
var defaultPluginRenaming = {
|
|
1059
1076
|
"@stylistic": "style",
|
|
@@ -1066,6 +1083,7 @@ function cuiqg(options = {}, ...userConfigs) {
|
|
|
1066
1083
|
prettier: enablePrettier = false,
|
|
1067
1084
|
gitignore: enableGitignore = true,
|
|
1068
1085
|
unocss: enableUnocss = hasUnocss,
|
|
1086
|
+
tailwindcss: enableTailwindcss = hasTailwindcss,
|
|
1069
1087
|
vue: enableVue = hasVue,
|
|
1070
1088
|
stylistic: enableStylistic = true,
|
|
1071
1089
|
jsdoc: enableJsdoc = false
|
|
@@ -1107,6 +1125,11 @@ function cuiqg(options = {}, ...userConfigs) {
|
|
|
1107
1125
|
unocss()
|
|
1108
1126
|
);
|
|
1109
1127
|
}
|
|
1128
|
+
if (enableTailwindcss) {
|
|
1129
|
+
configs.push(
|
|
1130
|
+
tailwindcss()
|
|
1131
|
+
);
|
|
1132
|
+
}
|
|
1110
1133
|
if (enablePrettier) {
|
|
1111
1134
|
configs.push(
|
|
1112
1135
|
prettier()
|
|
@@ -1148,6 +1171,7 @@ var index_default = cuiqg;
|
|
|
1148
1171
|
defaultPluginRenaming,
|
|
1149
1172
|
disables,
|
|
1150
1173
|
gitignore,
|
|
1174
|
+
hasTailwindcss,
|
|
1151
1175
|
hasUnocss,
|
|
1152
1176
|
hasVue,
|
|
1153
1177
|
ignores,
|
|
@@ -1163,6 +1187,7 @@ var index_default = cuiqg;
|
|
|
1163
1187
|
sortJsconfig,
|
|
1164
1188
|
sortPackageJson,
|
|
1165
1189
|
stylistic,
|
|
1190
|
+
tailwindcss,
|
|
1166
1191
|
toml,
|
|
1167
1192
|
unicorn,
|
|
1168
1193
|
unocss,
|
package/dist/index.js
CHANGED
|
@@ -119,6 +119,7 @@ import { isPackageExists } from "local-pkg";
|
|
|
119
119
|
var isInEditor = !!((process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM) && !process.env.CI);
|
|
120
120
|
var hasVue = isPackageExists("vue") || isPackageExists("nuxt") || isPackageExists("vitepress") || isPackageExists("@slidev/cli");
|
|
121
121
|
var hasUnocss = isPackageExists("unocss") || isPackageExists("@unocss/webpack") || isPackageExists("@unocss/nuxt");
|
|
122
|
+
var hasTailwindcss = isPackageExists("tailwindcss");
|
|
122
123
|
|
|
123
124
|
// src/configs/javascript.js
|
|
124
125
|
async function javascript() {
|
|
@@ -415,10 +416,9 @@ async function macros() {
|
|
|
415
416
|
|
|
416
417
|
// src/configs/prettier.js
|
|
417
418
|
async function prettier() {
|
|
418
|
-
const [pluginJsonc, pluginPrettier
|
|
419
|
+
const [pluginJsonc, pluginPrettier] = await Promise.all([
|
|
419
420
|
interopDefault(import("eslint-plugin-jsonc")),
|
|
420
|
-
interopDefault(import("eslint-plugin-prettier"))
|
|
421
|
-
interopDefault(import("eslint-config-prettier"))
|
|
421
|
+
interopDefault(import("eslint-plugin-prettier"))
|
|
422
422
|
]);
|
|
423
423
|
return [
|
|
424
424
|
{
|
|
@@ -427,7 +427,6 @@ async function prettier() {
|
|
|
427
427
|
prettier: pluginPrettier
|
|
428
428
|
},
|
|
429
429
|
rules: {
|
|
430
|
-
...configPrettier.rules,
|
|
431
430
|
...pluginPrettier.configs.recommended.rules,
|
|
432
431
|
...pluginJsonc.configs.prettier.rules,
|
|
433
432
|
"prettier/prettier": "warn"
|
|
@@ -975,6 +974,22 @@ async function toml() {
|
|
|
975
974
|
];
|
|
976
975
|
}
|
|
977
976
|
|
|
977
|
+
// src/configs/tailwindcss.js
|
|
978
|
+
async function tailwindcss() {
|
|
979
|
+
const pluginTailwindcss = await interopDefault(import("eslint-plugin-tailwindcss"));
|
|
980
|
+
return [
|
|
981
|
+
{
|
|
982
|
+
name: "cuiqg/tailwindcss",
|
|
983
|
+
plugins: {
|
|
984
|
+
tailwindcss: pluginTailwindcss
|
|
985
|
+
},
|
|
986
|
+
rules: {
|
|
987
|
+
...pluginTailwindcss.configs.recommended.rules
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
];
|
|
991
|
+
}
|
|
992
|
+
|
|
978
993
|
// src/presets.js
|
|
979
994
|
var defaultPluginRenaming = {
|
|
980
995
|
"@stylistic": "style",
|
|
@@ -987,6 +1002,7 @@ function cuiqg(options = {}, ...userConfigs) {
|
|
|
987
1002
|
prettier: enablePrettier = false,
|
|
988
1003
|
gitignore: enableGitignore = true,
|
|
989
1004
|
unocss: enableUnocss = hasUnocss,
|
|
1005
|
+
tailwindcss: enableTailwindcss = hasTailwindcss,
|
|
990
1006
|
vue: enableVue = hasVue,
|
|
991
1007
|
stylistic: enableStylistic = true,
|
|
992
1008
|
jsdoc: enableJsdoc = false
|
|
@@ -1028,6 +1044,11 @@ function cuiqg(options = {}, ...userConfigs) {
|
|
|
1028
1044
|
unocss()
|
|
1029
1045
|
);
|
|
1030
1046
|
}
|
|
1047
|
+
if (enableTailwindcss) {
|
|
1048
|
+
configs.push(
|
|
1049
|
+
tailwindcss()
|
|
1050
|
+
);
|
|
1051
|
+
}
|
|
1031
1052
|
if (enablePrettier) {
|
|
1032
1053
|
configs.push(
|
|
1033
1054
|
prettier()
|
|
@@ -1069,6 +1090,7 @@ export {
|
|
|
1069
1090
|
defaultPluginRenaming,
|
|
1070
1091
|
disables,
|
|
1071
1092
|
gitignore,
|
|
1093
|
+
hasTailwindcss,
|
|
1072
1094
|
hasUnocss,
|
|
1073
1095
|
hasVue,
|
|
1074
1096
|
ignores,
|
|
@@ -1084,6 +1106,7 @@ export {
|
|
|
1084
1106
|
sortJsconfig,
|
|
1085
1107
|
sortPackageJson,
|
|
1086
1108
|
stylistic,
|
|
1109
|
+
tailwindcss,
|
|
1087
1110
|
toml,
|
|
1088
1111
|
unicorn,
|
|
1089
1112
|
unocss,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cuiqg/eslint-config",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.27",
|
|
4
4
|
"description": "ESLint config preset for @cuiqg",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
"@stylistic/eslint-plugin": "^2.9.0",
|
|
38
38
|
"@unocss/eslint-plugin": "^66.0.0",
|
|
39
39
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
40
|
-
"eslint-config-prettier": "^9.1.0",
|
|
41
40
|
"eslint-flat-config-utils": "^0.4.0",
|
|
42
41
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
43
42
|
"eslint-plugin-import-x": "^4.3.1",
|
|
@@ -45,6 +44,7 @@
|
|
|
45
44
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
46
45
|
"eslint-plugin-n": "^17.11.1",
|
|
47
46
|
"eslint-plugin-prettier": "^5.2.1",
|
|
47
|
+
"eslint-plugin-tailwindcss": "^3.18.0",
|
|
48
48
|
"eslint-plugin-toml": "^0.12.0",
|
|
49
49
|
"eslint-plugin-unicorn": "^56.0.0",
|
|
50
50
|
"eslint-plugin-vue": "^9.29.1",
|