Sunday, 6 September 2020

Questions about ESLint and Prettier

The other day I was setting up a project. I didn't add any formatting. My friend suggested adding a linter so that our code can be formatted to reduce the chance of conflicts.So I tried to set up ESlint. It was the biggest headache ever. First I had to fight VSCode's linter, which even after disabling, would still randomly "start working". I've seen others talk about the tediousness of setting eslint online, so I thought I'd give it a try another day.Anyways, I decided to use Prettier, and it worked much better. I would save the file, and it would format it.So my question is, is it worth bringing in ESLint now? I believe it can do other things like warn you about unused variables, or about const vs var.Additionally, let's say I want use the Airbnb config for eslint. Are the only steps required by me to add the dev dependency of prettier-airbnb-eslint?I've already added some of my rules here:{ "semi": false, "singleQuote": true, "trailingComma": "none" } Do I have to change them If I want to add airbnb config?

Submitted September 07, 2020 at 07:20AM by pyboy10000

No comments:

Post a Comment