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

Allow plugins to be configured from outside the package without developer intervention #22

Open
midgleyc opened this issue May 16, 2022 · 1 comment

Comments

@midgleyc
Copy link

Looking at #12 (comment) and 478d477, it looks like the way to implement a new plugin is:

  • confirm that it can run in a browser
  • install it as a dependency
  • import it in messageProcessor (now main.ts)
  • add it to plugins

Is this correct? If so, given a plugin that can run in a browser, could you allow a plugin array to be configured in dprint.json, and use await import('prettier-plugin-name') or some other form of dynamic require to install user configured (and user-installed) plugins? I think this would require at least node 14 for top-level await, but 12 has just gone end-of-life.

I ask this because while it would be feasible for you to add everyone's plugins one by one, that seems like potentially a lot of overhead (and version increments) compared with having configuration available for a user to do it themselves.

@gunta
Copy link

gunta commented Jun 21, 2022

+1
Definitely, I think this is the biggest issue with the project right now.

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