@sxzz/eslint-config 3.7.2 → 3.7.3
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 +5 -2
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -58,6 +58,7 @@ __export(src_exports, {
|
|
|
58
58
|
configPrettier: () => configPrettier,
|
|
59
59
|
getVueVersion: () => getVueVersion,
|
|
60
60
|
hasTypeScript: () => hasTypeScript,
|
|
61
|
+
hasUnocss: () => hasUnocss,
|
|
61
62
|
hasVue: () => hasVue,
|
|
62
63
|
ignores: () => ignores,
|
|
63
64
|
imports: () => imports,
|
|
@@ -273,6 +274,7 @@ var import_local_pkg = require("local-pkg");
|
|
|
273
274
|
var isInEditor = (import_node_process.default.env.VSCODE_PID || import_node_process.default.env.JETBRAINS_IDE) && !import_node_process.default.env.CI;
|
|
274
275
|
var hasTypeScript = (0, import_local_pkg.isPackageExists)("typescript");
|
|
275
276
|
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");
|
|
277
|
+
var hasUnocss = (0, import_local_pkg.isPackageExists)("unocss") || (0, import_local_pkg.isPackageExists)("@unocss/webpack");
|
|
276
278
|
|
|
277
279
|
// src/configs/javascript.ts
|
|
278
280
|
var javascript = [
|
|
@@ -1029,11 +1031,11 @@ var all = [
|
|
|
1029
1031
|
...prettier
|
|
1030
1032
|
];
|
|
1031
1033
|
function sxzz(config = [], {
|
|
1032
|
-
vue: enableVue =
|
|
1034
|
+
vue: enableVue = hasVue,
|
|
1033
1035
|
prettier: enablePrettier = true,
|
|
1034
1036
|
markdown: enableMarkdown = true,
|
|
1035
1037
|
sortKeys: enableSortKeys = true,
|
|
1036
|
-
unocss: enableUnocss =
|
|
1038
|
+
unocss: enableUnocss = hasUnocss
|
|
1037
1039
|
} = {}) {
|
|
1038
1040
|
const configs = [...basic, ...yml, ...presetJsonc];
|
|
1039
1041
|
if (enableSortKeys) {
|
|
@@ -1086,6 +1088,7 @@ function sxzz(config = [], {
|
|
|
1086
1088
|
configPrettier,
|
|
1087
1089
|
getVueVersion,
|
|
1088
1090
|
hasTypeScript,
|
|
1091
|
+
hasUnocss,
|
|
1089
1092
|
hasVue,
|
|
1090
1093
|
ignores,
|
|
1091
1094
|
imports,
|
package/dist/index.d.cts
CHANGED
|
@@ -52,6 +52,7 @@ declare const yml: FlatESLintConfigItem[];
|
|
|
52
52
|
declare const isInEditor: boolean | "" | undefined;
|
|
53
53
|
declare const hasTypeScript: boolean;
|
|
54
54
|
declare const hasVue: boolean;
|
|
55
|
+
declare const hasUnocss: boolean;
|
|
55
56
|
|
|
56
57
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
57
58
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -100,4 +101,4 @@ declare function sxzz(config?: FlatESLintConfigItem | FlatESLintConfigItem[], {
|
|
|
100
101
|
sortKeys: boolean;
|
|
101
102
|
}>): FlatESLintConfigItem[];
|
|
102
103
|
|
|
103
|
-
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, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, unicorn, unocss, vue, yml };
|
|
104
|
+
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, hasUnocss, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, unicorn, unocss, vue, yml };
|
package/dist/index.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ declare const yml: FlatESLintConfigItem[];
|
|
|
52
52
|
declare const isInEditor: boolean | "" | undefined;
|
|
53
53
|
declare const hasTypeScript: boolean;
|
|
54
54
|
declare const hasVue: boolean;
|
|
55
|
+
declare const hasUnocss: boolean;
|
|
55
56
|
|
|
56
57
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
57
58
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -100,4 +101,4 @@ declare function sxzz(config?: FlatESLintConfigItem | FlatESLintConfigItem[], {
|
|
|
100
101
|
sortKeys: boolean;
|
|
101
102
|
}>): FlatESLintConfigItem[];
|
|
102
103
|
|
|
103
|
-
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, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, unicorn, unocss, vue, yml };
|
|
104
|
+
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, hasUnocss, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, unicorn, unocss, vue, yml };
|
package/dist/index.js
CHANGED
|
@@ -171,6 +171,7 @@ import { isPackageExists } from "local-pkg";
|
|
|
171
171
|
var isInEditor = (process2.env.VSCODE_PID || process2.env.JETBRAINS_IDE) && !process2.env.CI;
|
|
172
172
|
var hasTypeScript = isPackageExists("typescript");
|
|
173
173
|
var hasVue = isPackageExists("vue") || isPackageExists("nuxt") || isPackageExists("vitepress") || isPackageExists("@slidev/cli");
|
|
174
|
+
var hasUnocss = isPackageExists("unocss") || isPackageExists("@unocss/webpack");
|
|
174
175
|
|
|
175
176
|
// src/configs/javascript.ts
|
|
176
177
|
var javascript = [
|
|
@@ -927,11 +928,11 @@ var all = [
|
|
|
927
928
|
...prettier
|
|
928
929
|
];
|
|
929
930
|
function sxzz(config = [], {
|
|
930
|
-
vue: enableVue =
|
|
931
|
+
vue: enableVue = hasVue,
|
|
931
932
|
prettier: enablePrettier = true,
|
|
932
933
|
markdown: enableMarkdown = true,
|
|
933
934
|
sortKeys: enableSortKeys = true,
|
|
934
|
-
unocss: enableUnocss =
|
|
935
|
+
unocss: enableUnocss = hasUnocss
|
|
935
936
|
} = {}) {
|
|
936
937
|
const configs = [...basic, ...yml, ...presetJsonc];
|
|
937
938
|
if (enableSortKeys) {
|
|
@@ -983,6 +984,7 @@ export {
|
|
|
983
984
|
configPrettier,
|
|
984
985
|
getVueVersion,
|
|
985
986
|
hasTypeScript,
|
|
987
|
+
hasUnocss,
|
|
986
988
|
hasVue,
|
|
987
989
|
ignores,
|
|
988
990
|
imports,
|