A custom ESLint parser using the Hermes JavaScript parser, optimized for linting Flow-typed code. Version 0.35.0 is current, with active development on GitHub (facebook/hermes). Unlike babel-eslint or @babel/eslint-parser, hermes-eslint uses Hermes' own parser, ensuring precise adherence to Flow syntax and avoiding potential mismatches. It supports JSX, Flow, and modern ECMAScript features, with options for jsxPragma, jsxFragmentName, sourceType, and FBT. It is the recommended parser for Facebook's internal linting and for projects heavily reliant on Flow.
npm install hermes-eslintVerified import paths — ran on the pinned version, not inferred.
Configures ESLint to use hermes-eslint as parser with module source type and React JSX pragma.
Upgrade ESLint to 6.x or later and use hermes-eslint >=0.10.0.
Remove 'useJSXTextNode' from parserOptions; it is no longer necessary.
Set 'parser' to 'hermes-eslint' only for .js/.jsx files; use override patterns if mixing with Babel.
Test --fix on a small file first; disable autofix for rules known to conflict with Flow.
Remove the option; modern parsers support object rest/spread natively.
Run 'npm install --save-dev hermes-eslint' or ensure it's in your package.json.
Verify .eslintrc JSON is valid and that 'parser' is set to exactly "hermes-eslint".
Use dynamic import: const { parseForESLint } = await import('hermes-eslint'); or ensure you are in an ESM context.