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

New plugin system #55

Open
Tracked by #769
dsherret opened this issue Jul 31, 2023 · 2 comments
Open
Tracked by #769

New plugin system #55

dsherret opened this issue Jul 31, 2023 · 2 comments
Milestone

Comments

@dsherret
Copy link
Member

The latest dprint 0.40 adds functionality that makes this possible. Essentially, I would like to add prettier plugins, which are available at urls.

{
  "prettier": {
    "plugins": [
      "https://prettier.dprint.dev/astro-0.11.0.js",
      "https://prettier.dprint.dev/svelte-3.0.3.js"
    ]
  },
  "plugins": [
    "https://plugins.dprint.dev/prettier-0.26.6.json@0118376786f37496e41bb19dbcfd1e7214e2dc859a55035c5e54d1107b4c9c57"
  ]
}
  1. These scripts run sandboxed and do not have access to the file system or network.
  2. They are automatically upgraded when someone runs dprint config update
  3. No need to specify file extensions or associations. The plugin will provide it.
  4. Probably each plugin needs to be a single bundled javascript file in order to reduce the complexity.
This was referenced Oct 28, 2023
@dsherret dsherret added this to the 0.28 milestone Oct 29, 2023
@adaliszk
Copy link

Are the plugins hand-selected few or would auto-bundle all prettier plugins?

@RafaelKr
Copy link

RafaelKr commented Nov 21, 2024

I would love to see support for https://github.com/tailwindlabs/prettier-plugin-tailwindcss

https://tailwindcss.com/blog/automatic-class-sorting-with-prettier

Edit: maybe we also would need this, to be able to run it for .html.twig files: https://github.com/ttskch/prettier-plugin-tailwindcss-anywhere

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

3 participants