eslint-config-angular

raw JSON →
0.5.0 verified Sat Apr 25 auth: no javascript maintenance

ESLint shareable config for Angular (AngularJS) projects using eslint-plugin-angular. Version 0.5.0 last released; appears to be in maintenance mode with no recent updates. Opinionated preset that enables the Angular plugin, adds 'angular' as a global, and disables no-use-before-define. Differentiates from raw eslint-plugin-angular by providing a ready-to-use config that removes friction.

error Configuration for rule "angular/component-name" is invalid: Severity should be one of the following: 0 = off, 1 = warn, 2 = error
cause Using string severity like 'error' instead of number.
fix
Use numeric severity: 2 for error.
error ESLint couldn't find the plugin "eslint-plugin-angular". (ESLintError)
cause eslint-plugin-angular not installed.
fix
npm install --save-dev eslint-plugin-angular
error Cannot find module 'eslint-config-angular'
cause Package not installed or extend string wrong (e.g., used 'eslint-config-angular' in extends).
fix
npm install --save-dev eslint-config-angular, then use extends: 'angular'
error Error: Failed to load plugin 'angular' declared in 'BaseConfig': Cannot find module 'eslint-plugin-angular'
cause Plugin not installed or not resolvable.
fix
Ensure eslint-plugin-angular is installed and in the same node_modules tree as ESLint.
deprecated Package has no recent updates; compatible with older ESLint ecosystem (likely ESLint < 9).
fix Consider upgrading to modern Angular ESLint (like angular-eslint) for Angular 2+ projects. For AngularJS, this still works but may lack latest rules.
gotcha eslint-plugin-angular is a required peer dependency but not listed as such; must be installed separately.
fix Run: npm install --save-dev eslint-plugin-angular
gotcha The config extends string is 'angular', not 'eslint-config-angular'.
fix Use 'angular' in extends field; ESLint resolves it automatically.
gotcha Assumes AngularJS (1.x) globals; not suitable for Angular (2+).
fix Use @angular-eslint for Angular 2+ projects.
npm install eslint-config-angular
yarn add eslint-config-angular
pnpm add eslint-config-angular

Shows minimal .eslintrc config extending angular config and an optional rule override. Requires manual installation of eslint-plugin-angular.

// .eslintrc.json
{
  "extends": "angular",
  "rules": {
    "angular/component-name": [2, "camelCase"] // override example
  }
}

// Also install required plugins:
// npm install --save-dev eslint-config-angular eslint-plugin-angular eslint

// Then run ESLint:
// npx eslint .