ESLint plugin providing AngularJS (Angular 1.x) specific linting rules, covering best practices, conventions, and potential errors. Current stable version is 5.0.0, which requires ESLint ^9.32.0 and drops support for earlier versions. The plugin includes a shareable config based on John Papa's AngularJS style guide. It is the most established ESLint plugin for AngularJS, with over 150 rules organized into categories like possible errors, conventions, and style. Release cadence is low; updates are prompted by major ESLint changes. Key differentiator: specifically for AngularJS (not Angular 2+), with many rules directly mapping to the John Papa style guide.
npm install eslint-plugin-angularVerified import paths — ran on the pinned version, not inferred.
Shows how to install and configure eslint-plugin-angular with ESLint v9 flat config, enabling three common rules.
Upgrade ESLint to ^9.32.0 or pin eslint-plugin-angular to ^4.1.0 if you cannot upgrade.
Migrate from .eslintrc to eslint.config.js/.mjs using the flat config format shown in the quickstart.
Use: rules: { ...angular.configs.johnpapa.rules } or specify individual rules.Use 'angular/controller-name', etc. in your rules configuration.
Check documentation and migrate to recommended replacements if available.
Run 'npm install --save-dev eslint-plugin-angular'.
Replace 'extends: ['angular']' with 'plugins: { angular }, rules: { ...angular.configs.johnpapa.rules }'.Ensure 'plugins: { angular }' is set in flat config, or 'plugins: ['angular']' in legacy config. Use 'angular/' prefix.