---
url: /docs/guide/usage/linter/rules/react/rule-suppression.md
---

### What it does

Reports ESLint/Oxlint suppressions of React rules (for example
`eslint-disable-next-line react-hooks/exhaustive-deps`) inside a
component or hook. The React Compiler skips functions containing such
suppressions, since the suppressed violation may make compilation
unsafe.

Powered by the React Compiler, which runs once per file and is shared
with the other React Compiler rules. Port of
`react-hooks/rule-suppression`.

### Why is this bad?

Suppressing a React rule hides a violation the compiler must assume is
real; the whole function loses optimization until the suppression is
removed and the underlying error fixed.

### Examples

Examples of **incorrect** code for this rule:

```jsx
function Component({ value }) {
  // eslint-disable-next-line react-hooks/exhaustive-deps
  const doubled = value * 2;
  return <div>{doubled}</div>;
}
```

Examples of **correct** code for this rule:

```jsx
function Component({ value }) {
  const doubled = value * 2;
  return <div>{doubled}</div>;
}
```

## How to use

## Version

This rule was added in v1.79.0.

## References
