Adding ESLint and Prettier to a Project
In this video, we will add several useful tools and settings to optimize the project’s codebase.
First, we’ll configure the Angular CLI to generate components with ChangeDetection.OnPush by default. This strategy significantly reduces unnecessary re-renders in the component tree, improving overall application performance.
We’ll also set up ESLint and Prettier. ESLint is a static analysis tool that helps enforce consistent code style, especially in team environments.
Prettier is a code formatter that takes care of things like line length and tab size. Since their rules can sometimes overlap, it’s common to use eslint-plugin-prettier, which integrates Prettier into ESLint.
0 Comments