hermes-eslint
hermes-eslint
is a custom parser for ESLint. It is the recommended parser for use for linting with Flow code.
Usage
To use hermes-eslint
as the parser for ESLint in your project you must specify "hermes-eslint"
as the "parser"
in your .eslintrc
configuration file:
{
"parser": "hermes-eslint"
}
The ESLint documentation provides more information about how to configure ESLint, including how to specify a custom parser.
Options
You may provide additional configuration for hermes-eslint
by passing an object containing configuration options as the "parserOptions"
in your ESLint configuration file. This object may contain the following properties:
type ParserOptions = {
jsxPragma?: string | null,
jsxFragmentName?: string | null,
sourceType?: 'script' | 'module',
fbt?: boolean,
};
{
"parser": "hermes-eslint",
"parserOptions": {
"sourceType": "module"
}
}