@cuiqg/eslint-config 2.8.6 → 2.8.7
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.mjs +3 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -109,7 +109,6 @@ const hasVue = () => [
|
|
|
109
109
|
const hasTypeScript = () => isPackageExists("typescript");
|
|
110
110
|
const hasUnocss = () => isPackageExists("unocss");
|
|
111
111
|
const hasTailwindcss = () => isPackageExists("tailwindcss");
|
|
112
|
-
const hasPrettier = () => isPackageExists("prettier");
|
|
113
112
|
|
|
114
113
|
//#endregion
|
|
115
114
|
//#region src/configs/javascript.js
|
|
@@ -645,7 +644,7 @@ const defaultPluginRenaming = {};
|
|
|
645
644
|
/**
|
|
646
645
|
*
|
|
647
646
|
* @param {object} options - 设置选项
|
|
648
|
-
* @param {boolean} [options.prettier] - 是否启用 Prettier 格式化
|
|
647
|
+
* @param {boolean} [options.prettier=false] - 是否启用 Prettier 格式化
|
|
649
648
|
* @param {boolean} [options.unocss] - 是否启用 Unocss 格式化
|
|
650
649
|
* @param {boolean} [options.tailwindcss] - 是否启用 Tailwindcss 格式化
|
|
651
650
|
* @param {boolean} [options.vue] - 是否启用 VUE 格式化
|
|
@@ -655,7 +654,7 @@ const defaultPluginRenaming = {};
|
|
|
655
654
|
* @returns {Promise<Object[]>} 合并后的配置
|
|
656
655
|
*/
|
|
657
656
|
function cuiqg(options = {}, ...userConfigs) {
|
|
658
|
-
const { jsdoc: enableJsdoc = true, prettier: enablePrettier =
|
|
657
|
+
const { jsdoc: enableJsdoc = true, prettier: enablePrettier = false, unocss: enableUnocss = hasUnocss(), tailwindcss: enableTailwindcss = hasTailwindcss(), vue: enableVue = hasVue() } = options;
|
|
659
658
|
const configs = [];
|
|
660
659
|
configs.push(ignores(), comments(), javascript(), stylistic(), packageJson());
|
|
661
660
|
if (enableJsdoc) configs.push(jsdoc());
|
|
@@ -673,4 +672,4 @@ function cuiqg(options = {}, ...userConfigs) {
|
|
|
673
672
|
var src_default = cuiqg;
|
|
674
673
|
|
|
675
674
|
//#endregion
|
|
676
|
-
export { GLOB_CSS, GLOB_EXCLUDE, GLOB_JS, GLOB_JSX, GLOB_LESS, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_STYLUS, GLOB_TS, GLOB_TSX, GLOB_VUE, comments, cuiqg, src_default as default, defaultPluginRenaming,
|
|
675
|
+
export { GLOB_CSS, GLOB_EXCLUDE, GLOB_JS, GLOB_JSX, GLOB_LESS, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_STYLUS, GLOB_TS, GLOB_TSX, GLOB_VUE, comments, cuiqg, src_default as default, defaultPluginRenaming, hasTailwindcss, hasTypeScript, hasUnocss, hasVue, ignores, isInEditor, isInGitHookOrLintStaged, javascript, jsdoc, macros, packageJson, prettier, stylistic, stylisticConfigDefaults, tailwindcss, unocss, vue };
|