Skip to main content

Code quality: ESLint and Prettier

Learn Code quality: ESLint and Prettier (Module 25 · Angular CLI and Developer Tools, Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Linting and formatting • ESLint reads your code and warns about mistakes and bad patterns (unused variables, missing track, inaccessible markup). Like Checkstyle/SpotBugs in Java. • Prettier rewrites the code layout (quotes, spacing, line width) automatically so nobody argues about style, like a Java formatter. Setup: ng add angular-eslint then npx ng lint . Install Prettier with npm and add a .prettierrc .

More lessons in Module 25 · Angular CLI and Developer Tools