Modern ESLint configuration with strict rules for Angular development
A production-ready, opinionated ESLint configuration that enforces best practices for Angular applications. Combines rules from industry-leading plugins into a single package with zero additional configuration required.
📘 TypeScript: Member ordering, promise-async, type imports, strict typing, type safety, extraneous classes,...
✨ Code Quality: Complexity max, file length control, import cycles detection, 100+ Unicorn best practices,...
🎨 Style: Airbnb extended, max line length, arrow parens, object/class newlines, sorted keys/imports,...
🔍 Templates: 30+ rules with alphabetical attrs, complexity max, control flow, trackBy, a11y, no-any,...
Airbnb Extended - Airbnb style guide
Angular ESLint - Angular-specific rules
ESLint - Core linting engine
- 📦 Import-X - Import/export validation
Stylistic - Code formatting rules
TypeScript ESLint - TypeScript linting
- 🦄 Unicorn - More than 100 powerful ESLint rules
npm install eslint-config-angular-strict --save-devor
yarn add eslint-config-angular-strict --deveslint dependency from your project - it's included!
Create an eslint.config.js file (ESLint 9 flat config format):
import angularStrict from 'eslint-config-angular-strict';
export default [
...angularStrict,
// Your custom overrides here
];Add the following to your package.json:
{
"type": "module"
}Make sure your tsconfig.json is properly configured:
{
"compilerOptions": {
(...),
"allowUnusedLabels": false,
"exactOptionalPropertyTypes": true,
"noImplicitOverride": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
"strictStandalone": true,
"strictTemplates": true
}
}Contributions are welcome! Please open an issue or submit a PR.
MIT © Jean-benoit Gautier