# hermes-eslint

> A custom parser for ESLint using the Hermes parser

Latest version **0.37.0** (published 2026-07-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install hermes-eslint
pnpm add hermes-eslint
yarn add hermes-eslint
bun add hermes-eslint
```

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score; popular repo.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.37.0 |
| Published | 2026-07-14 |
| First published | 2021-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 335 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11335 |
| Maintainers | fb, flowtype, hermes-team |

## Links

- npm: https://www.npmjs.com/package/hermes-eslint
- Repository: https://github.com/facebook/hermes
- npm.io page: https://npm.io/package/hermes-eslint

## Dependencies (2)

- [hermes-estree](https://npm.io/package/hermes-estree.md) 0.37.0
- [hermes-parser](https://npm.io/package/hermes-parser.md) 0.37.0

## Recent versions

- 0.37.0 (latest) — 2026-07-14
- 0.36.1 — 2026-05-06
- 0.36.0 — 2026-04-28
- 0.35.0 — 2026-04-09
- 0.34.0 — 2026-03-13
- 0.33.3 — 2026-01-07
- 0.33.2 — 2025-12-29
- 0.33.1 — 2025-12-21
- 0.33.0 — 2025-12-12
- 0.32.1 — 2025-09-22
- 0.32.0 — 2025-08-20
- 0.31.2 — 2025-08-16
- 0.31.0 — 2025-07-30
- 0.30.0 — 2025-07-24
- 0.29.1 — 2025-06-27
- … 47 more at https://npm.io/package/hermes-eslint/versions

## README

# hermes-eslint

`hermes-eslint` is a custom parser for [ESLint](https://eslint.org/). It is the recommended parser for use for linting with Flow code.

## Usage

### Flat config (`eslint.config.js`)

To use `hermes-eslint` with ESLint flat config, set it as
`languageOptions.parser`:

```js
module.exports = [
  {
    languageOptions: {
      parser: require('hermes-eslint'),
    },
  },
];
```

You can configure parser options with
`languageOptions.parserOptions`:

```js
module.exports = [
  {
    languageOptions: {
      parser: require('hermes-eslint'),
      parserOptions: {
        sourceType: 'module',
      },
    },
  },
];
```

### Legacy config (`.eslintrc`)

If you are still using legacy ESLint config, specify
`"hermes-eslint"` as the `"parser"` in your `.eslintrc` file:

```json
{
  "parser": "hermes-eslint"
}
```

The ESLint documentation provides more information about [how to configure ESLint](https://eslint.org/docs/latest/use/configure/), including [how to specify a custom parser](https://eslint.org/docs/latest/use/configure/parser).

### Options

You may provide additional configuration for `hermes-eslint` by passing an
object containing configuration options as `parserOptions` in your ESLint
configuration file. In flat config, this is `languageOptions.parserOptions`.
This object may contain the following properties:

```ts
type ParserOptions = {
  /**
   * The identifier that's used for JSX Element creation (after transpilation).
   * This should not be a member expression - just the root identifier (i.e. use "React" instead of "React.createElement").
   *
   * To use the new global JSX transform function, you can explicitly set this to `null`.
   *
   * Defaults to `"React"`.
   */
  jsxPragma?: string | null,

  /**
   * The identifier that's used for JSX fragment elements (after transpilation).
   * If `null`, assumes transpilation will always use a member on `jsxFactory` (i.e. React.Fragment).
   * This should not be a member expression - just the root identifier (i.e. use "h" instead of "h.Fragment").
   *
   * Defaults to `null`.
   */
  jsxFragmentName?: string | null,

  /**
   * The source type of the script.
   *
   * Defaults to `"module"`.
   */
  sourceType?: 'script' | 'module',

  /**
   * Ignore <fbt /> JSX elements when adding references to the module-level `React` variable.
   * FBT is JSX that's transformed to non-JSX and thus references differently
   *
   * https://facebook.github.io/fbt/
   */
  fbt?: boolean,
};
```

```json
{
  "parser": "hermes-eslint",
  "parserOptions": {
    "sourceType": "module"
  }
}
```

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