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
it appears the issue has nothing to do with this or the "parent" prettier plugin but rather an incompatibility between two plugins for prettier. See here.
The reason why imports were being sorted when using .prettierrc instead of .prettierrc.js was due to the fact that "prettier-plugin-tailwindcss" was either being imported incorrectly or can not be imported in a non-js file? Idk
Either way, I fixed it using the linked solution.
Do not know if there is a way of eliminating this conflict without having to create a "in-project" plugin
Thanks for finding the issue and reporting back. I don't think there's anything we can do for now, and tailwindlabs/prettier-plugin-tailwindcss#31 seems to be where the activity is happening. I'm going to close this for now, since it's not a bug in this plugin per se, but thanks again for bringing it up.
Your Environment
Describe the bug
When a file is
.prettierrc
imports are sorted. When the file is.prettierrc.js
imports are not sorted.Expected behavior
Given a
.prettierrc.js
file imports should be sorted.However, this only appears to work when using
.prettierrc
as aJSON
orjson5
file.Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
Error log
Tried using
VSCode
format on save andCLI
. Both runs terminate successfully, but imports are not sorted.Contribute to @ianvs/prettier-plugin-sort-imports
The text was updated successfully, but these errors were encountered: