logoESLint React

Presets

The following presets are available in @eslint-react/eslint-plugin:

For ESLint Legacy Config (.eslintrc.*), add a -legacy suffix to the preset name (e.g. recommended-legacy).

Bare Bones

  • core
    Enable rules for "react".
  • dom
    Enable rules for "react-dom".
  • web-api
    Enable rules for interacting with Web APIs.

General Purpose

  • recommended
    Enforce rules that are recommended by ESLint React for general purpose React + React DOM projects.
    This preset includes the core, dom, and web-api presets.

TypeScript Specialized

  • recommended-typescript
    Same as the recommended preset but disables rules that can be enforced by TypeScript.

  • recommended-type-checked
    Same as the recommended-typescript preset but enables additional rules that require type information.

Other

  • disable-dom
    Disable rules in the dom preset.
  • disable-web-api
    Disable rules in the web-api preset.
  • disable-type-checked
    Disable rules that require type information.
  • off
    Disable all rules in this plugin except for debug rules.

References

On this page