You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using prettier-plugin-organize-imports in my project. After installing prettier-plugin-tailwind, prettier-plugin-organize-imports stopped working.
This is due to the fact that both plugins are redefining the typescript parser in their configuration, both importing prettier/parser-typescript to inherit from it.
prettier-plugin-organize-imports uses the preprocess property of the parser while prettier-plugin-tailwind uses the parse property, but the last plugin loaded by prettier completely overrides any previous one.
To Reproduce
Steps to reproduce the behavior:
install prettier-plugin-organize-imports, it works.
install prettier-plugin-tailwind, it works but 1. not longer works.
Expected behavior
Does anyone know if it is possible to have both plugin working together (something like merging their parser configuration together)?
Versions:
prettier-plugin-tailwind version: 2.2.8
prettier-plugin-organize-imports version: 1.1.1
The text was updated successfully, but these errors were encountered:
@hrougier Thank you for opening this.
Unfortunately prettier has lack of support for the kind of plugins like this one and prettier-plugin-organize-imports.
I looked into this issue when writing this plugin but it seems like for now we have to wait for prettier to add better support for these cases - unless someone finds a good approach to fix this, in which case a PR would be really appreciated.
Describe the bug
I was using prettier-plugin-organize-imports in my project. After installing
prettier-plugin-tailwind
,prettier-plugin-organize-imports
stopped working.This is due to the fact that both plugins are redefining the
typescript
parser in their configuration, both importingprettier/parser-typescript
to inherit from it.prettier-plugin-organize-imports
uses thepreprocess
property of the parser whileprettier-plugin-tailwind
uses theparse
property, but the last plugin loaded by prettier completely overrides any previous one.To Reproduce
Steps to reproduce the behavior:
prettier-plugin-organize-imports
, it works.prettier-plugin-tailwind
, it works but 1. not longer works.Expected behavior
Does anyone know if it is possible to have both plugin working together (something like merging their parser configuration together)?
Versions:
The text was updated successfully, but these errors were encountered: