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.

If list-different detects differences, it should print command for fixing

See original GitHub issue

It would be nice if list-different printed the command for fixing (prettier --write <files>) if it detected differences. This way, someone doesn’t have to hunt down the syntax.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
lydellcommented, Aug 21, 2019

We explored this a little in #6406, but as mentioned there and in the above two comments we decided to leave things as they are.

1reaction
kachkaevcommented, Aug 21, 2019

IMO alternative 1 (prettier --write "**/*.{css,html,js,md,yml}") is the least evil. Enumerating unformatted files explicitly does not scale (the command can get very long) and listing ‘common ways’ will probably bring more confusion than help.

As far as I understand, it’s impossible to determine whether prettier was executed via npx, via a globally installed CLI command, via a package.json script, via npm prettier / yarn prettier or by typing path/to/node_modules/.bin/prettier directly. All we have access to is the list of applied options (--config, --ignore-path, etc.). Even if all these options are relayed to the proposed --write command, there is no guarantee the command will work because we won’t be able to guess how exactly --check was called in the first place.

Given a very small demand (only 3 👍), I’d prefer not to have anything than something too fragile.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Printer Not Accepting Print Command - YouTube
How to fix if your printer is not accepting print commands. Commands used in this tutorial: Net Stop Spooler del ...
Read more >
Solve printing problems on Mac - Apple Support
If you print a document from your Mac, but the document doesn't appear at the printer, try these suggestions.
Read more >
Fix printer connection and printing problems in Windows
If you're trying to use your printer and run into problems, here are some steps for common printer problems to try to get...
Read more >
Working in cyber security assessment - Started on Monday, 21 ...
Logging and monitoring - Design your systems to detect and investigate incidents. ... List different types of security data with an example of...
Read more >
What to Do When Your Printer Won't Print | PCMag
On a Mac, go to System Preferences > Printers & Scanners and click the + button. Your computer should search for printers on...
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