Skip to content
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 v3 throws warning "Ignored unknown option" for importOrder / importOrderSeparation #244

Closed
1 task
escapedcat opened this issue Jul 26, 2023 · 3 comments

Comments

@escapedcat
Copy link

Your Environment

  • Prettier version: 3.0.0
  • node version: 18.8.0
  • package manager: [email protected]
  • IDE: CLI

Describe the bug

After updating to prettier v3 it throws warnings.

To Reproduce

Install latest version of prettier-plugin-sort-imports and prettier v3

Expected behavior

No warning is thrown and plugin works as expected.

Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)

.prettierrc

{
  "trailingComma": "es5",
  "tabWidth": 2,
  "importOrder": ["^[./]"],
  "importOrderSeparation": true
}

Error log

Checking formatting...
[warn] Ignored unknown option { importOrder: ["^[./]"] }.
[warn] Ignored unknown option { importOrderSeparation: true }.
...

Contribute to @trivago/prettier-plugin-sort-imports

  • I'm willing to fix this bug 🥇

I am but would need support

@escapedcat
Copy link
Author

Switching from .prettierrc to .prettierrc.js like suggested in #131 (comment) works for me.
Closing this :P

@Hypenate
Copy link

This is bad...
Can you alteast mention that this plugin does not work with .prettierrc?

Lost a lot of time because of this. We removed the plugin.

@ollebergkvist
Copy link

ollebergkvist commented Jul 31, 2024

@escapedcat Just arrived to this thread. This is not a fix if you use ESM unfortunately :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants