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 thecore
,dom
, andweb-api
presets.
TypeScript Specialized
-
recommended-typescript
Same as therecommended
preset but disables rules that can be enforced by TypeScript. -
recommended-type-checked
Same as therecommended-typescript
preset but enables additional rules that require type information.
Other
disable-dom
Disable rules in thedom
preset.disable-web-api
Disable rules in theweb-api
preset.disable-type-checked
Disable rules that require type information.off
Disable all rules in this plugin except for debug rules.