{"id":19735,"library":"eslint-plugin-ember","title":"eslint-plugin-ember","description":"ESLint plugin providing a comprehensive set of lint rules for Ember.js applications, currently at v13.1.0 (as of April 2026). Released under the Ember CLI organization with frequent minor/patch releases (multiple per year). Supports both flat config (ESLint >=8.40) and legacy .eslintrc. Requires Node >=20.19. Key differentiator: the de facto standard linter for Ember, includes rules for both JavaScript/TypeScript and Handlebars templates (gjs/gts) via ember-eslint-parser, with built-in presets for recommended, gjs, and gts configurations. Actively maintained with community contributions.","status":"active","version":"13.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/ember-cli/eslint-plugin-ember","tags":["javascript","eslint","eslintplugin","eslint-plugin","ember","ember.js","plugin","styleguide","rules"],"install":[{"cmd":"npm install eslint-plugin-ember","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-ember","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-ember","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency for parsing TypeScript (and gts) files","package":"@typescript-eslint/parser","optional":true},{"reason":"Peer dependency; must be >= 8.40.0 for v13 compatibility","package":"eslint","optional":false}],"imports":[{"note":"ESM-only since v13? Actually this package ships both CJS and ESM; require() still works. But for flat config, ESM import is recommended.","wrong":"const eslintPluginEmber = require('eslint-plugin-ember')","symbol":"plugin (default)","correct":"import eslintPluginEmber from 'eslint-plugin-ember'"},{"note":"Use ESM import for flat config. CJS require is still possible but deprecated in v13+.","wrong":"require('eslint-plugin-ember/configs/recommended')","symbol":"configs/recommended","correct":"import recommended from 'eslint-plugin-ember/configs/recommended'"},{"note":"Named export 'rules' is available as an object of all rule definitions.","wrong":"import * as emberPlugin from 'eslint-plugin-ember'; const rules = emberPlugin.rules","symbol":"rules","correct":"import { rules } from 'eslint-plugin-ember'"},{"note":"For .gts files; must be used with ember-eslint-parser.","wrong":"require('eslint-plugin-ember/configs/recommended-gts')","symbol":"configs/recommended-gts","correct":"import gtsConfig from 'eslint-plugin-ember/configs/recommended-gts'"}],"quickstart":{"code":"// 1. Install\n// npm install --save-dev eslint-plugin-ember\n\n// 2. eslint.config.js (flat config)\nimport eslintPluginEmberRecommended from 'eslint-plugin-ember/configs/recommended';\n\nexport default [\n  ...eslintPluginEmberRecommended,\n  {\n    rules: {\n      'ember/no-replace-test-comments': 'error',\n    },\n  },\n];\n\n// 3. For gjs/gts files, also install:\n// npm install --save-dev ember-eslint-parser @typescript-eslint/parser\n\n// Then add overrides:\n// {\n//   files: ['**/*.gjs'],\n//   parser: 'ember-eslint-parser',\n//   ...eslintPluginEmberRecommended,\n//   ...require('eslint-plugin-ember/configs/recommended-gjs'),\n// }","lang":"javascript","description":"Minimal flat config setup with recommended rules and gjs/gts override example."},"warnings":[{"fix":"Upgrade ESLint to >= 8.40 and ensure Node >= 20.19.","message":"v13 drops support for ESLint < 8.40 and replaces deprecated ESLint context methods, breaking compatibility with older ESLint versions.","severity":"breaking","affected_versions":">=13.0.0"},{"fix":"Review ember-eslint-parser changelog; update parser options if using custom parser settings.","message":"v13.0.0 upgrades ember-eslint-parser to 0.8.0, which may require parser configuration changes for gjs/gts files.","severity":"breaking","affected_versions":">=13.0.0"},{"fix":"Migrate to eslint.config.js flat config as shown in the README.","message":"The legacy .eslintrc config format (extends, plugins) is deprecated in favor of flat config (eslint.config.js).","severity":"deprecated","affected_versions":">=13.0.0"},{"fix":"Use separate override blocks for .gjs/.gts files and set parser: 'ember-eslint-parser' only in those blocks.","message":"Parsers cannot be overwritten in overrides; gjs/gts must use 'ember-eslint-parser' in separate override blocks.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use eslint-disable comments in templates or configure globals.","message":"Rule 'no-undef' in gjs/gts templates will flag template variables not in JS scope; need to disable or configure.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Set parser: 'ember-eslint-parser' for .ts files as well if they import .gts.","message":"When using TypeScript (ts/gts), both @typescript-eslint/parser and ember-eslint-parser may be needed; .ts files require ember-eslint-parser if they import .gts files.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use import recommended from 'eslint-plugin-ember/configs/recommended' and spread it in eslint.config.js.","cause":"The plugin is not installed or not properly loaded in a flat config environment.","error":"ESLint couldn't find the config 'plugin:ember/recommended'."},{"fix":"npm install --save-dev ember-eslint-parser","cause":"The ember-eslint-parser package is not installed, but required for .gjs/.gts files.","error":"Parsing error: Cannot find module 'ember-eslint-parser'"},{"fix":"Migrate to eslint.config.js flat config.","cause":"Legacy .eslintrc format is no longer supported with ESLint 9+.","error":"Error: ESLint configuration in .eslintrc is deprecated. Use eslint.config.js instead."},{"fix":"Update plugin to v13+ and ESLint to >=8.40.","cause":"ESLint 10 removed deprecated context methods; v13 uses new API, but older plugin version might still call old methods.","error":"TypeError: context.getSource() is not a function","affected_versions":">=13.0.0"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}