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

Support compatibility with other prettier plugins #51

Closed
Jazcash opened this issue May 22, 2022 · 1 comment
Closed

Support compatibility with other prettier plugins #51

Jazcash opened this issue May 22, 2022 · 1 comment
Labels
question Further information is requested

Comments

@Jazcash
Copy link

Jazcash commented May 22, 2022

In the readme, it states:

Caveat

This plugin inherits, extends and overrides the built-in Prettier parsers for babel, babel-ts, typescript and vue, i. e., it's incompatible with other plugins that do the same... so only the last loaded plugin that exports one of those parsers will function.

I want to use this with prettier-plugin-multiline-arrays, but when this plugin is installed then it doesn't work at all, despite that plugin saying it's compatible with this one, so maybe something changed?

That plugin recommends fiddling with the plugin order to get it to work, but no order works when this plugin is installed, possibly something to do with how it just works out the box without requiring being added to prettier plugins list?

    plugins: [
        "prettier-plugin-multiline-arrays", // doesn't work regardless of order
        "prettier-plugin-organize-imports"
    ],
@simonhaenisch
Copy link
Owner

simonhaenisch commented May 23, 2022

Well, the readme states that this plugin is incompatible with others, whereas the other plugin claims to be compatible, so you should probably reopen your issue there. I haven't changed anything with this plugin in a while. Maybe something changed with Prettier's plugin API, or the other plugin.

Just looking at your plugins config though, have you tried with relative paths to the plugins, instead of just the names? Also, according to the other readme, it should be multiline-arrays last.

P. S. just some personal opinion: i'd just live with how Prettier formats stuff and not try to run another formatter on top of the already formatted code, cause 1) people used to Prettier might be confused, and 2) you'll most likely have setup issues, and need more complex configs (the cost/benefit ratio imo is not worth it).

@simonhaenisch simonhaenisch added the question Further information is requested label May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants