Open
Description
- Configure Prettier, Editorconfig and ESLint to make the code consistent throughout
Prettier
- It removes all original styling and ensures that all outputted code conforms to a consistent style
- It changes your code after writing your code
For example:- On save with the Visual Studio Code editor
- With a CLI like prettier --write .
EditorConfig
-
Editorconfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.
-
It applies your rules before writing code
For example:- When you press TAB, it leaves four spaces.
ESLint
- ESLint statically analyzes your code to quickly find problems.
- ESLint finds problems in your code
They all have some common features in order to do the same things. So we have to ensure that none of them are conflicting.