Presets

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

These presets are for ESLint Flat Config (eslint.config.js) only.

Bare Bones

  • Core (core)
    Enable rules for "react".
  • DOM (dom)
    Enable rules for "react-dom".
  • Web API (web-api)
    Enable rules for interacting with Web APIs.

General Purpose

  • Recommended (recommended)
    Enforce rules that are recommended by ESLint React.
    This preset includes the core, dom, and web-api presets.

TypeScript Specialized

  • Recommended TypeScript (recommended-typescript)
    Same as the recommended preset but disables rules that can be covered by TypeScript.

  • Recommended Type-Checked (recommended-type-checked)
    Same as the recommended-typescript preset but enables additional rules that require type information.

Other

  • Disable DOM (disable-dom)
    Disable rules in the dom preset.
  • Disable Web API (disable-web-api)
    Disable rules in the web-api preset.
  • Disable Type-Checked (disable-type-checked)
    Disable rules that require type information.
  • Off (off)
    Disable all rules in this plugin except for debug rules.

Deprecated

PresetReplaced by
Off DOM (off-dom)Disable DOM (disable-dom)