Do Prettier and ESLint Do the Same Thing?
Do you have to choose between ESLint and Prettier? No! They both serve a different and complementary purpose in your codebase, and can be used alongside each other.
What does ESLint do?
Using the recommended rules, a file containing any console logs, duplicate keys in objects or code after
return statements would be output in the error report.
What does Prettier do?
Prettier and ESLint are two different tools
ESLint is a linter. It helps developers spot bugs and inconsistencies in their code by advising best practices and flagging problematic practices. Although it can auto fix some errors, by default ESLint gives the location of the problem and some helpful info, then it’s up to the developer to fix it.
Prettier is a code formatter. It will directly change the layout of your code without changing how it works.