tqwewe / prettier-plugin-tailwind

Sort tailwind classes in HTML with Prettier.

Home Page:https://www.npmjs.com/package/prettier-plugin-tailwind

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conflict with other prettier plugins

baranovskyi opened this issue · comments

Prettier-plugin-tailwind conflicts with prettier-plugin-organize-imports plugin in Angular project
Prettier plugin does not:

  • remove unused imports
  • make right order of imports

To Reproduce
Steps to reproduce the behavior:

  1. Create angular app with angular cli
  2. Install prettier, prettier-plugin-tailwind, prettier-plugin-organize-imports
  3. Create a component with different imports (angular-core, rxjs, etc)
  4. Do not use all of components
  5. Save a file
  6. Pay attention to the Imports section

Expected behavior
Unused imports should be removed
Imports should be formated

Versions:

  • prettier-plugin-tailwind version: 2.2.12
  • prettier: 2.4.1
  • NPM Yarn version: 6.14.15
  • Angular: 12.6.1

prettier config
{ "trailingComma": "all", "tabWidth": 4, "semi": true, "singleQuote": true, "bracketSpacing": true, "printWidth": 100, "attributeGroups": [ "$CLASS", "$ID", "$ANGULAR_ELEMENT_REF", "$ANGULAR_STRUCTURAL_DIRECTIVE", "$ANGULAR_ANIMATION", "$ANGULAR_ANIMATION_INPUT", "$ANGULAR_TWO_WAY_BINDING", "$ANGULAR_INPUT", "$ANGULAR_OUTPUT", "$CODE_GUIDE" ], "overrides": [ { "files": "*.component.html", "options": { "parser": "angular" } }, { "files": "*.html", "options": { "parser": "html" } } ] }

Duplicate of #23.