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

Feature: Prettier Plugin Collision Resolution #27

Open
fbartho opened this issue May 25, 2022 · 1 comment
Open

Feature: Prettier Plugin Collision Resolution #27

fbartho opened this issue May 25, 2022 · 1 comment

Comments

@fbartho
Copy link
Collaborator

fbartho commented May 25, 2022

Is your feature request related to a problem?
Prettier Plug-ins can collide with each-other: tailwindlabs/prettier-plugin-tailwindcss#31

Describe the solution you'd like
It’d be smart to have a documented procedure for working around this. It could even include code-changes if necessary.

Describe alternatives you've considered

  • Ignore collisions, and leave it up to users to figure out
  • Manually make a merger plugin

I don’t think this is a breaking blocker-issue (shouldn’t be in the milestone for #22), but it’d be smart to have a plan

@vincerubinetti
Copy link

vincerubinetti commented Jul 27, 2023

Related discussion:

hosseinmd/prettier-plugin-jsdoc#200

It seems like plugin-jsdoc is taking into account other plugins and trying to preserve their modifications, whereas plugin-sort-imports is not, because I have to put jsdoc after sort-imports or else sort-imports overwrites jsdoc's work. Maybe you can look at how they did the preserving?

I don't know anything about the prettier or prettier plugin architecture, so I don't know how hard this would be. Seems like maybe prettier could've designed their APIs a bit better to more gracefully identify and handle collisions...

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

No branches or pull requests

2 participants