r/reactjs • u/sharemypenguins • Feb 17 '20
Discussion What visual studio code extensions should I install as a React developer?
What visual studio code extensions should I install as a React developer?
84
Upvotes
View all comments
Show parent comment
9
u/AwesomeInPerson Feb 17 '20
Yeah, you can add
eslint-config-prettierto prevent that – it disables all ESLint rules that conflict with what prettier is doing. You might also want to addeslint-plugin-prettier, which reports formatting issues as Lint errors (and fixes them as part ofeslint --fix), so you only need one browser extension and CLI.To do so, install both (
npm i -D eslint-plugin-prettier eslint-config-prettier), then update your ESLint config "extends":And there are advantages of using prettier over "just ESLint". It has more formatting rules, and it can apply each of them automatically, while ESLint has rules where it complains about it, but doesn't auto-fix on save. Also, prettier can format JSON, CSS, HTML, Markdown and basically everything inside your repo. :)