{"id":18956,"library":"angular-eslint","title":"angular-eslint","description":"Official ESLint integration for Angular projects, enabling linting of Angular templates and TypeScript files with ESLint. Current stable version is v21.3.1, released in March 2026. It follows Angular major releases closely, with v21 supporting Angular 21 and ESLint v8/v9/v10. Key differentiators: provides Angular-specific ESLint rules (e.g., component-selector, no-uncalled-signals), schematic-based migration from TSLint, tight integration with Angular CLI via builders and schematics, and support for flat config. Requires typescript-eslint as a peer dependency.","status":"active","version":"21.3.1","language":"javascript","source_language":"en","source_url":"https://github.com/angular-eslint/angular-eslint","tags":["javascript","typescript"],"install":[{"cmd":"npm install angular-eslint","lang":"bash","label":"npm"},{"cmd":"yarn add angular-eslint","lang":"bash","label":"yarn"},{"cmd":"pnpm add angular-eslint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core linting engine peer dependency","package":"eslint","optional":false},{"reason":"Required for TypeScript linting support (v8+)","package":"typescript-eslint","optional":false},{"reason":"Required for schematic and builder integration","package":"@angular/cli","optional":true}],"imports":[{"note":"Default import for flat config; CJS require not supported in ESM-first packages.","wrong":"const angular-eslint = require('angular-eslint')","symbol":"angular-eslint","correct":"import angular-eslint from 'angular-eslint'"},{"note":"Utility functions are re-exported from @angular-eslint/utils, not the main package.","wrong":"import { processComponents } from 'angular-eslint'","symbol":"processComponents","correct":"import { processComponents } from '@angular-eslint/utils'"},{"note":"The plugin package exports a default ESLint plugin config object; named rules export exists but is less common.","wrong":"import { rules } from '@angular-eslint/eslint-plugin'","symbol":"ESLint config from '@angular-eslint/eslint-plugin'","correct":"import plugin from '@angular-eslint/eslint-plugin'"}],"quickstart":{"code":"// angular.json\n{\n  \"projects\": {\n    \"my-app\": {\n      \"architect\": {\n        \"lint\": {\n          \"builder\": \"@angular-eslint/builder:lint\",\n          \"options\": {\n            \"lintFilePatterns\": [\n              \"src/**/*.ts\",\n              \"src/**/*.html\"\n            ]\n          }\n        }\n      }\n    }\n  }\n}\n\n// eslint.config.js (flat config)\nimport angular from 'angular-eslint';\nimport tseslint from 'typescript-eslint';\n\nexport default tseslint.config(\n  {\n    files: ['**/*.ts'],\n    extends: [\n      ...tseslint.configs.recommended,\n      ...angular.configs.tsRecommended,\n    ],\n    processor: angular.processInlineTemplates,\n    rules: {\n      '@angular-eslint/directive-selector': [\n        'error',\n        { type: 'attribute', prefix: 'app', style: 'camelCase' },\n      ],\n      '@angular-eslint/component-selector': [\n        'error',\n        { type: 'element', prefix: 'app', style: 'kebab-case' },\n      ],\n    },\n  },\n  {\n    files: ['**/*.html'],\n    extends: [\n      ...angular.configs.templateRecommended,\n      ...angular.configs.templateAccessibility,\n    ],\n    rules: {},\n  }\n);","lang":"typescript","description":"Shows setup of angular-eslint with flat config including TypeScript and template rules."},"warnings":[{"fix":"Upgrade to Angular 21 and use ng update @angular/core @angular/cli angular-eslint.","message":"v21.0.0 requires Angular 21 and dropped support for Angular < 21.","severity":"breaking","affected_versions":"<21.0.0"},{"fix":"Run ng update angular-eslint to automatically migrate to ESLint.","message":"v20.0.0 migrated from TSLint to ESLint; TSLint configs are no longer supported.","severity":"breaking","affected_versions":"<20.0.0"},{"fix":"Use ng add @angular-eslint/schematics instead of manually installing.","message":"The @angular-eslint/schematics package has been deprecated in favor of ng add @angular-eslint/schematics (now integrated into CLI).","severity":"deprecated","affected_versions":">=18.0.0 <21.0.0"},{"fix":"Convert .eslintrc to flat config using the built-in schematic or manually.","message":"Flat config (eslint.config.js) is the default since v19; legacy .eslintrc is not supported in v21+.","severity":"gotcha","affected_versions":">=19.0.0"},{"fix":"Always import from 'angular-eslint' for consistent version resolution.","message":"The angular-eslint package re-exports from sub-packages; importing directly from '@angular-eslint/eslint-plugin' may cause version conflicts.","severity":"gotcha","affected_versions":">=20.0.0"},{"fix":"Replace processInlineTemplates with processInlineTemplate.","message":"The processor 'angular.processInlineTemplates' is deprecated; use 'angular.processInlineTemplate' instead.","severity":"deprecated","affected_versions":">=20.0.0 <21.0.0"},{"fix":"Upgrade to angular-eslint v21.3.0+ if using ESLint v10.","message":"ESLint v10 support was added in v21.3.0; using ESLint v10 with older angular-eslint versions will fail.","severity":"gotcha","affected_versions":"<21.3.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `ng add @angular-eslint/schematics` to install all required packages.","cause":"Missing peer dependency or incorrect installation order.","error":"Cannot find module '@angular-eslint/eslint-plugin'"},{"fix":"Update rule config to match new schema: { type: 'element', prefix: 'app', style: 'kebab-case' }.","cause":"Rule options changed in v21; previously accepted wrong format.","error":"Configuration for rule '@angular-eslint/component-selector' is invalid"},{"fix":"Ensure you import angular from 'angular-eslint' and use `...angular.configs.tsRecommended`.","cause":"Using flat config syntax incorrectly or missing import.","error":"Failed to load ESLint config: 'angular-eslint' is not a valid configuration"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}