-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prettier-plugin-sort-imports with prettier >=3 #251
Comments
A workaround is to use Javascript config format |
Nothing works for me. Package manager: Yarn (berry, 3.6.x) My working configuration (Prettier 2.8.8)package.json{
"type": "module",
"packageManager": "[email protected]",
"dependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"prettier": "^2.8.8"
}
} .prettierrc.cjs/** @type {import("prettier").Config} */
module.exports = {
plugins: [require("@trivago/prettier-plugin-sort-imports")],
singleQuote: false,
jsxSingleQuote: false,
arrowParens: "always",
trailingComma: "all",
bracketSameLine: false,
importOrder: ["^node:", "^(?![./]).*$", "^[./]"],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
}; After upgrading:
|
this solution works for me #245 (comment) |
this solution works for me #245 (comment) // .prettierrc
plugins: ['@trivago/prettier-plugin-sort-imports'] |
This issue still remains in prettier 3.1.1
but none seems to work |
Thank you a lot, saved my day. |
It doesn't work still. :( |
if you have multiple plugins loaded, try adjusting the order, e.g. keep @trivago/prettier-plugin-sort-imports last but I found that if you use prettier-plugin-organize-attributes at the same time, the latter one will inevitably fail |
Environment
Prettier version**: 3.0.3
Describe the bug
with version >=3 prettier-plugin-sort-imports doesn't work
while with version 2.0.8 it works correctly.
How come ?
The text was updated successfully, but these errors were encountered: