Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-dom/no-dangerously-set-innerhtml-with-children

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`dom`, `recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Disallow `dangerouslySetInnerHTML` and `children` at the same time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-dom/no-dangerously-set-innerhtml

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`dom`, `recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Disallow `dangerouslySetInnerHTML`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-dom/no-find-dom-node

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`dom`, `recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Disallow `findDOMNode`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-dom/no-flush-sync

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`dom`, `recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Disallow `flushSync`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@ react-dom/no-hydrate

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`dom`, `recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Replaces usages of `ReactDom.hydrate()` with `hydrateRoot()`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ react-dom/no-missing-button-type

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`

`dom`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Enforces explicit `type` attribute for `button` elements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ react-dom/no-missing-iframe-sandbox

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`

`dom`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Enforces explicit `sandbox` attribute for `iframe` elements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-dom/no-namespace

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`dom`, `recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Enforces the absence of a `namespace` in React elements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-dom/no-render-return-value

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`dom`, `recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Disallow the return value of `ReactDOM.render`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@ react-dom/no-render

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`dom`, `recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Replaces usages of `ReactDom.render()` with `createRoot(node).render()`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-dom/no-script-url

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`dom`, `recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Disallow `javascript:` URLs as attribute values.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ react-dom/no-string-style-prop

**Presets**

- `dom`
- `strict`
- `recommended`

`dom`, `recommended`, `strict`
## Description

Disallow the use of string style prop in JSX. Use an object instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ react-dom/no-unsafe-iframe-sandbox

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`

`dom`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Enforces `sandbox` attribute for `iframe` elements is not set to unsafe combinations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ react-dom/no-unsafe-target-blank

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`

`dom`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Prevents the use of `target="_blank"` without `rel="noreferrer noopener"`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@ react-dom/no-use-form-state

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`dom`, `recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Replaces usages of `useFormState` with `useActionState`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-dom/no-void-elements-with-children

**Presets**

- `dom`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`dom`, `recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Disallow `children` in void DOM elements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ react-hooks-extra/no-direct-set-state-in-use-effect

**Presets**

- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Disallow **direct** calls to the [`set` function](https://react.dev/reference/react/useState#setstate) of `useState` in `useEffect`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ react-naming-convention/context-name

**Presets**

- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Enforces context name to be a valid component name with the suffix `Context`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ react-naming-convention/use-state

**Presets**

- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`
## Description

Enforces destructuring and symmetric naming of `useState` hook value and setter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-web-api/no-leaked-event-listener

**Presets**

- `web-api`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`, `web-api`
## Description

Enforces that every `addEventListener` in a component or custom Hook has a corresponding `removeEventListener`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-web-api/no-leaked-interval

**Presets**

- `web-api`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`, `web-api`
## Description

Enforces that every `setInterval` in a component or custom Hook has a corresponding `clearInterval`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-web-api/no-leaked-resize-observer

**Presets**

- `web-api`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`, `web-api`
## Description

Enforces that every `ResizeObserver` created in a component or custom Hook has a corresponding `ResizeObserver.disconnect()`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-web-api/no-leaked-timeout

**Presets**

- `web-api`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`, `web-api`
## Description

Enforces that every `setTimeout` in a component or custom Hook has a corresponding `clearTimeout`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-x/jsx-key-before-spread

**Presets**

- `x`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`, `x`
## Description

Enforces that the 'key' prop is placed before the spread prop in JSX elements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ react-x/jsx-no-comment-textnodes

**Presets**

- `x`
- `strict`
- `strict-typescript`
- `strict-type-checked`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`

`recommended` / `recommended-type-checked` / `recommended-typescript`, `strict` / `strict-type-checked` / `strict-typescript`, `x`
## Description

Prevents comment strings (e.g. beginning with `//` or `/*`) from being accidentally inserted into the JSX element's textnodes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ react-x/jsx-no-duplicate-props

**Presets**

- `x`
- `strict`
- `recommended`

`recommended`, `strict`, `x`
## Description

Disallow duplicate props in JSX elements.
Expand Down
Loading