logoESLint React
Configuration

Configure Language Config

ESLint React uses your language config for static analysis. This page details which options are used and how they affect the linting process.

JSX Transform

ESLint React uses compiler options in tsconfig.json or jsconfig.json to determine the JSX transform the project is using.

The following compiler options are respected:

PropTypeDefault
jsx?
JSXTransform
"react-jsx"
jsxFactory?
string
"React.createElement"
jsxFragmentFactory?
string
"React.Fragment"
jsxImportSource?
string
"react"

If nothing is specified, it defaults to automatic.

Since this part does not perform type checking, there is almost no performance impact.

Rules that Need Type Information

ESLint React uses the Typed Linting API from typescript-eslint to retrieve type information for the rules that require it.

The following rules require type information:

The project or projectService options in parserOptions must be set correctly for the rules to work.

Enabling these rules will have performance impact, but they are more powerful than traditional lint rules.

Resources

For more information, see:

On this page