ember-eslint-parser is a specialized ESLint parser designed to understand and lint Ember.js specific file formats: Glimmer JavaScript (`.gjs`), Glimmer TypeScript (`.gts`), and Handlebars (`.hbs`) template files. As of its current stable version, 0.10.0, released in April 2026, it receives frequent minor updates, often monthly or bi-monthly, reflecting active development. The parser works in conjunction with `eslint-plugin-ember` to provide comprehensive static analysis for Ember applications. Its key differentiator is the ability to parse embedded Glimmer templates within JavaScript/TypeScript files and traditional Handlebars templates, enabling a unified linting experience across an Ember project's varied file types, particularly crucial for modern Ember Octane and Polaris applications.
npm install ember-eslint-parserVerified import paths — ran on the pinned version, not inferred.
This ESLint flat configuration demonstrates how to enable `ember-eslint-parser` for Glimmer JavaScript (.gjs), Glimmer TypeScript (.gts), and Handlebars (.hbs) files, integrating with `eslint-plugin-ember` recommended presets.
It is recommended to use this parser via `eslint-plugin-ember` and update both packages in sync. Exercise caution if using this parser directly for custom tooling.
Ensure `@typescript-eslint/parser` is installed as a peer dependency in your project. For example: `npm install --save-dev @typescript-eslint/parser` or `pnpm add -D @typescript-eslint/parser`.
For full static analysis and improved linting accuracy regarding variable definitions, migrate Handlebars templates to `.gjs` or `.gts` files where possible.
Ensure your project's dependencies are updated to compatible versions of `content-tag`, `html-tags`, and `mathml-tag-names` when upgrading to `ember-eslint-parser` v0.7.0 or newer.
If encountering issues with ESLint autofixing or parsing when using `typescript-eslint` v8, ensure `ember-eslint-parser` is updated to at least v0.5.9.
Install the peer dependency: `npm install --save-dev @typescript-eslint/parser` or `pnpm add -D @typescript-eslint/parser`.
For `.hbs` files, explicitly pass variables as block parameters (e.g., `<MyComponent as |someVariable|>`) or consider migrating to `.gjs`/`.gts` for improved static analysis. In `.gjs`/`.gts`, ensure variables are correctly imported or declared.
Ensure `ember-eslint-parser`, `eslint-plugin-ember`, and `@typescript-eslint/parser` are all updated to their latest compatible versions. Check your `package.json` for conflicting versions of these or related AST-parsing libraries.