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.

Add prettier to project

See original GitHub issue

Problem

The project doesn’t have any prettier, so the code style doesn’t follow any rule letting anyone commit formatted code

Solution

Add prettier to project

PS:

Here needed to be evaluated: training comma, ; at the end, parentheses on one arg arrow function …

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
peacechencommented, Feb 10, 2021

There may be some truth to that, but there is overlap. ESlint has built-in formatting capabilities too. That statement from prettier is more marketing gimmick than absolute truth 🤣

https://www.digitalocean.com/community/tutorials/linting-and-formatting-with-eslint-in-vs-code https://medium.com/@netczuk/even-faster-code-formatting-using-eslint-22b80d061461

Prettier undoes multi-line JSX props and smashes them all onto one long line. That’s the reason prettier was removed, and they refuse to add an option to stop doing that so this project won’t go back to prettier. https://github.com/prettier/prettier/issues/5501

0reactions
peacechencommented, Feb 10, 2021

If you have any recommendations for eslint configuration rules, please feel free to submit a PR. It is valuable to have a basic set of formatting behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install - Prettier
Install an exact version of Prettier locally in your project. · Add a .prettierrc.json to let your editor know that you are using...
Read more >
How to Add Prettier to a Project - Bits and Pieces
1. Install Prettier · 2. Create a .prettierrc file and add the following · 3. Set up Prettier to ignore certain files ·...
Read more >
Adding Prettier to a Project - Sia Karamalegos
A key step here is to run Prettier on all the files in a separate commit. You don't want to pollute all your...
Read more >
Adding Prettier onto an existing project - Thibaud's blog
Update the project's .editorconfig first, as Prettier reads it (here's an example). · Create a prettier.config.js with any desired options.
Read more >
Adding Prettier to a project - gists · GitHub
Adding Prettier to a Project · Install prettier: · Create an empty config file to let tools know you're using Prettier: · Create...
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