logoESLint React
Configuration

Configure Language Config

TIP

Once you've correctly configured the project or projectService options in parserOptions for the files to be analyzed, ESLint React utilizes the information within to make more accurate determinations.

ESLint React references your language config to determine how to perform static code analysis. This page details which parts of ESLint React utilize your language config.

JSX Runtime

ESLint React reads your tsconfig.json or jsconfig.json configuration files to determines how to perform the JSX analysis internally.

The following compiler options are respected:

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

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 project or projectService options in parserOptions must be set correctly for the rules to work.

The following rules require type information:

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

Resources

For more information, see:

On this page