0.26.0 • Published 6 months ago

hermes-eslint v0.26.0

Weekly downloads
5
License
MIT
Repository
github
Last release
6 months ago

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 = {
  /**
   * 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,
};
{
  "parser": "hermes-eslint",
  "parserOptions": {
    "sourceType": "module"
  }
}
0.26.0

6 months ago

0.25.1

7 months ago

0.25.0

8 months ago

0.24.0

9 months ago

0.23.1

11 months ago

0.23.0

11 months ago

0.22.0

1 year ago

0.21.1

1 year ago

0.21.0

1 year ago

0.20.1

1 year ago

0.20.0

1 year ago

0.19.2

1 year ago

0.19.1

1 year ago

0.19.0

1 year ago

0.18.2

1 year ago

0.18.1

2 years ago

0.17.0

2 years ago

0.18.0

2 years ago

0.17.1

2 years ago

0.16.0

2 years ago

0.12.0

2 years ago

0.13.0

2 years ago

0.12.1

2 years ago

0.14.0

2 years ago

0.13.1

2 years ago

0.15.0

2 years ago

0.15.1

2 years ago

0.11.0

2 years ago

0.11.1

2 years ago

0.10.0

2 years ago

0.10.1

2 years ago

0.9.0

3 years ago

0.8.0

3 years ago

0.7.0

3 years ago

0.5.0

4 years ago

0.6.0

3 years ago

0.4.8

4 years ago

0.4.7

4 years ago

0.4.6

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago