# ember-eslint-parser

> This is the eslint parser for ember's gjs and gts files (using ``), and also for Handlebars (`.hbs`) template files.

Latest version **0.14.6** (published 2026-08-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install ember-eslint-parser
pnpm add ember-eslint-parser
yarn add ember-eslint-parser
bun add ember-eslint-parser
```

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.14.6 |
| Published | 2026-08-19 |
| First published | 2023-12-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=16.0.0 |
| Dependencies | 8 |
| Unpacked size | 37.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 6 |
| Maintainers | nullvoxpopuli |

## Links

- npm: https://www.npmjs.com/package/ember-eslint-parser
- Repository: https://github.com/ember-tooling/ember-eslint-parser
- Homepage: https://github.com/ember-tooling/ember-eslint-parser#readme
- Issues: https://github.com/ember-tooling/ember-eslint-parser/issues
- npm.io page: https://npm.io/package/ember-eslint-parser

## Dependencies (8)

- [svg-tags](https://npm.io/package/svg-tags.md) ^1.0.0
- [html-tags](https://npm.io/package/html-tags.md) ^5.1.0
- [content-tag](https://npm.io/package/content-tag.md) ^4.1.1
- [ember-estree](https://npm.io/package/ember-estree.md) ^0.6.10
- [eslint-scope](https://npm.io/package/eslint-scope.md) ^9.1.2
- [@glimmer/syntax](https://npm.io/package/@glimmer/syntax.md) ^0.95.0
- [mathml-tag-names](https://npm.io/package/mathml-tag-names.md) ^4.0.0
- [@typescript-eslint/tsconfig-utils](https://npm.io/package/@typescript-eslint/tsconfig-utils.md) ^8.57.1

## Recent versions

- 0.14.6 (latest) — 2026-08-19
- 0.14.5 — 2026-08-18
- 0.14.4 — 2026-07-08
- 0.14.3 — 2026-07-03
- 0.14.2 — 2026-07-03
- 0.14.1 — 2026-07-03
- 0.14.0 — 2026-06-23
- 0.13.0 — 2026-05-29
- 0.12.1 — 2026-05-28
- 0.12.0 — 2026-05-16
- 0.11.3 — 2026-04-28
- 0.11.2 — 2026-04-27
- 0.11.1 — 2026-04-25
- 0.11.0 — 2026-04-24
- 0.10.0 — 2026-04-19
- … 41 more at https://npm.io/package/ember-eslint-parser/versions

## README

# ember-eslint-parser

This is the eslint parser for ember's gjs and gts files (using `<template>`), and also for Handlebars (`.hbs`) template files.

It is meant to be used with [eslint-plugin-ember](https://github.com/ember-cli/eslint-plugin-ember), which provides nice defaults for all the different file types in ember projects.

It's recommended to only use _overrides_ when defining your eslint config, so using this parser would look like this:
```js 
    {
      files: ['**/*.gjs'],
      parser: 'ember-eslint-parser',
      plugins: ['ember'],
      extends: [
        'eslint:recommended',
        'plugin:ember/recommended',
        'plugin:ember/recommended-gjs',
      ],
    },
    {
      files: ['**/*.gts'],
      parser: 'ember-eslint-parser',
      plugins: ['ember'],
      extends: [
        'eslint:recommended',
        'plugin:ember/recommended',
        'plugin:ember/recommended-gts',
      ],
    },
```

if we detect a typescript parser, it will also be used for all files, otherwise babel parser will be used.
If we cannot find a typescript parser when linting gts we throw an error. 

If you use type-aware rules, route `.js`/`.ts` through this parser too, as
`eslint-plugin-ember`'s configs do:

```js
    {
      files: ['**/*.{js,ts}'],
      parser: 'ember-eslint-parser',
      // ...
    },
```

`@typescript-eslint/parser` hands TypeScript the source as ESLint read it, so a
`.ts` file importing from a `.gts` gets an `error` type for that import. This
parser rewrites the specifier first.

## HBS (Handlebars) support

For `.hbs` template files, use the `ember-eslint-parser/hbs` parser. In ESLint's flat config format (ESLint 9+):

```js
// eslint.config.mjs
import hbsParser from 'ember-eslint-parser/hbs';

export default [
  {
    files: ['**/*.hbs'],
    languageOptions: {
      parser: hbsParser,
    },
  },
];
```

> **Note:** In `.hbs` files, all locals not defined in the template are assumed to be defined at runtime. This avoids false-positive `no-undef` errors for template identifiers. This is a known limitation of the classic HBS format — use `.gjs`/`.gts` for full static analysis.

## Support

eslint-plugin-ember is the primary consumer of this parser library, so SemVer _may_ not be respected for other consumers.

---
_Source: https://npm.io/package/ember-eslint-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
