eslint-plugin-ember
raw JSON → 13.1.0 verified Sat Apr 25 auth: no javascript
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.
Common errors
error ESLint couldn't find the config 'plugin:ember/recommended'. ↓
cause The plugin is not installed or not properly loaded in a flat config environment.
fix
Use import recommended from 'eslint-plugin-ember/configs/recommended' and spread it in eslint.config.js.
error Parsing error: Cannot find module 'ember-eslint-parser' ↓
cause The ember-eslint-parser package is not installed, but required for .gjs/.gts files.
fix
npm install --save-dev ember-eslint-parser
error Error: ESLint configuration in .eslintrc is deprecated. Use eslint.config.js instead. ↓
cause Legacy .eslintrc format is no longer supported with ESLint 9+.
fix
Migrate to eslint.config.js flat config.
error TypeError: context.getSource() is not a function ↓
cause ESLint 10 removed deprecated context methods; v13 uses new API, but older plugin version might still call old methods.
fix
Update plugin to v13+ and ESLint to >=8.40.
Warnings
breaking v13 drops support for ESLint < 8.40 and replaces deprecated ESLint context methods, breaking compatibility with older ESLint versions. ↓
fix Upgrade ESLint to >= 8.40 and ensure Node >= 20.19.
breaking v13.0.0 upgrades ember-eslint-parser to 0.8.0, which may require parser configuration changes for gjs/gts files. ↓
fix Review ember-eslint-parser changelog; update parser options if using custom parser settings.
deprecated The legacy .eslintrc config format (extends, plugins) is deprecated in favor of flat config (eslint.config.js). ↓
fix Migrate to eslint.config.js flat config as shown in the README.
gotcha Parsers cannot be overwritten in overrides; gjs/gts must use 'ember-eslint-parser' in separate override blocks. ↓
fix Use separate override blocks for .gjs/.gts files and set parser: 'ember-eslint-parser' only in those blocks.
gotcha Rule 'no-undef' in gjs/gts templates will flag template variables not in JS scope; need to disable or configure. ↓
fix Use eslint-disable comments in templates or configure globals.
gotcha 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. ↓
fix Set parser: 'ember-eslint-parser' for .ts files as well if they import .gts.
Install
npm install eslint-plugin-ember yarn add eslint-plugin-ember pnpm add eslint-plugin-ember Imports
- plugin (default) wrong
const eslintPluginEmber = require('eslint-plugin-ember')correctimport eslintPluginEmber from 'eslint-plugin-ember' - configs/recommended wrong
require('eslint-plugin-ember/configs/recommended')correctimport recommended from 'eslint-plugin-ember/configs/recommended' - rules wrong
import * as emberPlugin from 'eslint-plugin-ember'; const rules = emberPlugin.rulescorrectimport { rules } from 'eslint-plugin-ember' - configs/recommended-gts wrong
require('eslint-plugin-ember/configs/recommended-gts')correctimport gtsConfig from 'eslint-plugin-ember/configs/recommended-gts'
Quickstart
// 1. Install
// npm install --save-dev eslint-plugin-ember
// 2. eslint.config.js (flat config)
import eslintPluginEmberRecommended from 'eslint-plugin-ember/configs/recommended';
export default [
...eslintPluginEmberRecommended,
{
rules: {
'ember/no-replace-test-comments': 'error',
},
},
];
// 3. For gjs/gts files, also install:
// npm install --save-dev ember-eslint-parser @typescript-eslint/parser
// Then add overrides:
// {
// files: ['**/*.gjs'],
// parser: 'ember-eslint-parser',
// ...eslintPluginEmberRecommended,
// ...require('eslint-plugin-ember/configs/recommended-gjs'),
// }