question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Only format on save if prettier is in the dependencies

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Reactions:18
  • Comments:5

github_iconTop GitHub Comments

6reactions
blainekastencommented, Mar 21, 2017

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.

3reactions
robwisecommented, Mar 21, 2017

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found