You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like the CLI tool to run npm run format (if defined) so that I don't commit accidentally wrongly formatted files regarding to my formatting settings.
Currently I have to run npm run format manually, or using a dev tool like pre-config, but as I noticed that svelte-add does reformat files, I wanted to suggest it.
PS: your library is a life changer for productivity and learning, so thanks a lot!
The text was updated successfully, but these errors were encountered:
Hey there, @cbenz. I appreciate the feature request! I'm not sure if this is something we want to do with this project, as it feels a bit too intrusive for a project that adds components to your lib.
svelte-add has the luxury of knowing when you have prettier installed, as installing it is part of its scope, but I don't even think it's a good idea that it runs formatting for you.
We have to ask the following questions:
does the user have prettier installed?
is the ui directory within a package inside a monorepo with prettier only installed at the root?
what is the format script the user uses
what if they aren't using prettier at all? Do we add checks for biome and any other formatter that pops up in the future?
You can see how much this adds, and we haven't even touched all the possibilities, so I don't think it's a good idea for these reasons. Perhaps we can revisit it in the future if something changes!
Describe the feature
I'd like the CLI tool to run
npm run format
(if defined) so that I don't commit accidentally wrongly formatted files regarding to my formatting settings.Currently I have to run
npm run format
manually, or using a dev tool like pre-config, but as I noticed that svelte-add does reformat files, I wanted to suggest it.PS: your library is a life changer for productivity and learning, so thanks a lot!
The text was updated successfully, but these errors were encountered: