Only format on save if prettier is in the dependencies
See original GitHub issueI have projects that use prettier
and adhere to the style standard, but I also have projects that neither use prettier
nor adhere to the style. (they enforce some other styleguide with eslint
)
It’d be great if the “Format on save” option only took effect in projects that have prettier
in their package.json
or something like that!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:18
- Comments:5
Top Results From Across the Web
VS-Code Prettier Format On Save doesn't work - Stack Overflow
Follow these steps: CTRL + SHIFT + P; Format Document (in pop-up bar); Select Format Document; Select Configure Default Formatter.
Read more >Install - Prettier
npm install --save-dev --save-exact prettier. yarn add --dev --exact prettier ... If your project isn't ready to format, say, HTML files yet, add...
Read more >How to configure Prettier and VSCode - Gleb Bahmutov
The code just magically gets to the format you pick. You can use Prettier from command line, or from your code editor whenever...
Read more >Prettier - Code formatter - Visual Studio Marketplace
If you would like to format a document that is configured to be ignored by Prettier either because it is in a .prettierignore...
Read more >Using Prettier and ESLint to automate formatting and fixing ...
It will spit out a configuration file and install any related dependencies for you. If you just want to use the built-in recommended...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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. https://github.com/jlongster/prettier-atom/issues/59#issuecomment-287848381