Skip to content

Commit

Permalink
feat!: remove prettier plugin tailwindcss
Browse files Browse the repository at this point in the history
  • Loading branch information
ModyQyW committed May 8, 2023
1 parent 6b7ab3a commit d2d5aae
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
11 changes: 0 additions & 11 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@ export const enableMiniprogram =

export const enableScss = isPackageExists('sass') || Boolean(process.env.ENABLE_SCSS);

export const enableTailwindCss =
isPackageExists('tailwindcss') || Boolean(process.env.ENABLE_TAILWIND_CSS);

export const enableTailwindCssIcons =
isPackageExists('@egoist/tailwindcss-icons') ||
isPackageExists('tailwindcss-plugin-icons') ||
Boolean(process.env.ENABLE_TAILWIND_CSS_ICONS);

export const enableUnoCss = isPackageExists('unocss') || Boolean(process.env.ENABLE_UNO_CSS);

export const enablePrettier = isPackageExists('prettier') || Boolean(process.env.ENABLE_PRETTIER);

export const enablePrettierPluginTailwindCss =
enableTailwindCss && !enableTailwindCssIcons && !enableUnoCss;
4 changes: 0 additions & 4 deletions src/prettier.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
/* eslint-disable unicorn/prefer-module */
import type { Config } from 'prettier';
import getDebug from 'debug';
import { enablePrettierPluginTailwindCss } from './helpers';

const debug = getDebug('@modyqyw/fabric/prettier');

debug('JSDoc plugin enabled.');
debug('PackageJson Plugin enabled.');
debug(`TailwindCSS plugin ${enablePrettierPluginTailwindCss ? 'enabled' : 'disabled'}.`);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const config: Config & { [key: string]: any } = {
printWidth: 100,
singleQuote: true,
trailingComma: 'all',
pluginSearchDirs: false,
jsdocCapitalizeDescription: false,
tsdoc: true,
plugins: [
require.resolve('prettier-plugin-jsdoc'),
require.resolve('prettier-plugin-packagejson'),
enablePrettierPluginTailwindCss ? require.resolve('prettier-plugin-tailwindcss') : null,
].filter((item) => !!item) as string[],
};

Expand Down

0 comments on commit d2d5aae

Please sign in to comment.