Skip to content

Commit

Permalink
Check for Tailwind Prettier plugin (closes #16)
Browse files Browse the repository at this point in the history
  • Loading branch information
knutkirkhorn committed Feb 5, 2024
1 parent 4ff878e commit da9e001
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions checkers/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,16 @@ async function checkPrettierConfig(directoryPath) {
);

const prettierErrors = [];
const hasInstalledTailwind = Object.keys(
packageJson.devDependencies,
).includes('tailwindcss');
const developmentDependencyErrors = checkDevelopmentDependencies(
packageJson,
[
'prettier',
'eslint-config-prettier',
'@ianvs/prettier-plugin-sort-imports',
hasInstalledTailwind && 'prettier-plugin-tailwindcss',
],
);
prettierErrors.push(...developmentDependencyErrors);
Expand Down

0 comments on commit da9e001

Please sign in to comment.