ESLint and Prettier are tools that can help with code formatting and syntax detection.
When these tools are added as extensions in your IDE, such as vscode, you'll see real-time squiggly lines and have the ability to format code on save.
However, if someone else starts your project in a different environment without these extensions, they may not have access to these helpful features.
On the other hand, by installing ESLint and Prettier as npm packages in your pipeline (e.g. npm start or continuous deployment), you may not have real-time squiggly lines, but you can still benefit from auto-formatting and blocking rules.
- Auto-formatting may not occur on save, depending on the configuration.
- Blocking rules can halt the pipeline until errors or warnings are fixed by the developer.
- Ensuring that anyone starting the project, regardless of their IDE, has the necessary packages included.