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
What is this plugin for? #11
Comments
The main thing is it allows you to have format with prettier via dprint's CLI, which may be useful if you're using other dprint plugins and want to run everything from a single CLI. Beyond that, it should be faster because dprint's CLI will cause multiple file formats to run in parallel and if you're using the incremental feature (https://dprint.dev/config/#incremental) it will only format files that have changed. |
Thanks for the response. So to clarify, this plugin will mean that dprint will format most files, but prettier will format the files that dprint doesn't support (e.g: svelte)? |
Not exactly. Dprint's CLI has no clue about how to format any kind of file. The plugins do that. So if you use the prettier plugin then it will format using prettier. If you use another plugin like dprint-plugin-typescript in addition to dprint-plugin-prettier, then you can get it formatting JavaScript and TypeScript code with dprint-plugin-typescript by putting the url for dprint-plugin-typescript before dprint-plugin-prettier's url in the plugins array of the configuration file. |
Got it. I think it might be worth adding a line to the README that says to put this plugin last. |
I feel a bit silly, I found this plugin b/c it helped me use dprint with svelte & astro.
But I'm wondering what does this plugin actually do? If it runs prettier, won't that make the speed benefits of dprint useless?
The text was updated successfully, but these errors were encountered: