-
-
Notifications
You must be signed in to change notification settings - Fork 96
Only format on save if prettier is in the dependencies #43
Comments
I was thinking in #41 that it might be good to do a blacklist glob, that might be better because that would cover cases where people still want to use prettier for their files even though the project might not have it listed in the dependencies. |
That seems… manual. I create new projects almost everyday, and updating a custom glob every time based on "do I want to use prettier or not" seems pretty tedious. I'm not sure I'd even enable that option just based on the fact that I'll probably forget about it. |
Why not both? |
I'm with @mxstbr here. I came here to raise this issue. Glad to see I'm not the only one facing this. I personally do not create a new repo every day, but I'm even just thinking organizationally as I try to introduce prettier to my company, asking every person in the company to set up their blacklist creates friction points to adoption. |
Sorry if I've been unclear on this, we are definitely going to get this addressed. Right now the plan is we are going to look for prettier/prettier-eslint (depending on your eslint integration setting), and if we don't find it, we will have an option in the settings where you can specify if you want us to fall back to the included packaged version or just not do anything. #59 (comment) |
…t in dependencies We will look for prettier (prettier-eslint/prettier-eslint-cli if you have the eslint integration setting enabled) in the package.json nearest to the file being formatted. The dependency can be in either the "dependencies" or "devDependencies" section. Resolves #43
…t in dependencies We will look for prettier (prettier-eslint/prettier-eslint-cli if you have the eslint integration setting enabled) in the package.json nearest to the file being formatted. The dependency can be in either the "dependencies" or "devDependencies" section. Resolves #43
I have projects that use
prettier
and adhere to the style standard, but I also have projects that neither useprettier
nor adhere to the style. (they enforce some other styleguide witheslint
)It'd be great if the "Format on save" option only took effect in projects that have
prettier
in theirpackage.json
or something like that!The text was updated successfully, but these errors were encountered: