# jsx-no-target-blank

Rule `react/jsx-no-target-blank`. Disallow `target="_blank"` attribute without `rel="noreferrer"`

- Source: react
- Technologies: React
- Kind: correctness
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 119.1M weekly downloads of presets that enable it
- Trend: +44.8% last quarter
- Rank: #142 by reach, #922 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `react/jsx-no-target-blank` | yes | safe | package `eslint-plugin-react` | [docs](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-target-blank.md) |
| Oxlint | `react/jsx-no-target-blank` | no | suggestion | plugin `react`, category pedantic | [docs](https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-no-target-blank.html) |
| Biome | `security/noBlankTarget` | yes | safe | group security, since 1.0.0 | [docs](https://biomejs.dev/linter/rules/no-blank-target/) |

## Code examples

### Incorrect: the rule reports this

```jsx
var Hello = <a target='_blank' href="https://example.com/"></a>
var Hello = <a target='_blank' href={dynamicLink}></a>
```

```jsx
var Hello = <Link target="_blank" to="https://example.com/"></Link>
var Hello = <Link target="_blank" to={dynamicLink}></Link>
```

### Correct: the rule accepts this

```jsx
var Hello = <p target="_blank"></p>
var Hello = <a target="_blank" rel="noreferrer" href="https://example.com"></a>
var Hello = <a target="_blank" rel="noopener noreferrer" href="https://example.com"></a>
var Hello = <a target="_blank" href="relative/path/in/the/host"></a>
var Hello = <a target="_blank" href="/absolute/path/in/the/host"></a>
var Hello = <a></a>
```

```jsx
var Hello = <a target='_blank' href={dynamicLink}></a>
```

```jsx
var Hello = <Link target="_blank" rel="noopener noreferrer" to="https://example.com"></Link>
var Hello = <Link target="_blank" to="relative/path/in/the/host"></Link>
var Hello = <Link target="_blank" to="/absolute/path/in/the/host"></Link>
var Hello = <Link />
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import react from "eslint-plugin-react";

export default [
  {
    plugins: { react },
    rules: {
      "react/jsx-no-target-blank": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "react"
  ],
  "rules": {
    "react/jsx-no-target-blank": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "security": {
        "noBlankTarget": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [React recommended](https://lintradar.dev/presets/react-recommended.md) | ESLint | `eslint-plugin-react` | 21 | 81.1M | +34.1% |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Create React App](https://lintradar.dev/presets/react-app.md) | ESLint | `eslint-config-react-app` | 109 | 4.1M | +4.3% |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [react/display-name](https://lintradar.dev/rules/react/display-name.md): Disallow missing displayName in a React component definition
- [react/no-deprecated](https://lintradar.dev/rules/react/no-deprecated.md): Disallow usage of deprecated methods
- [react/no-unescaped-entities](https://lintradar.dev/rules/react/no-unescaped-entities.md): Disallow unescaped HTML entities from appearing in markup
- [react/no-find-dom-node](https://lintradar.dev/rules/react/no-find-dom-node.md): Disallow usage of findDOMNode
- [react/no-direct-mutation-state](https://lintradar.dev/rules/react/no-direct-mutation-state.md): Disallow direct mutation of this.state
- [react/jsx-uses-vars](https://lintradar.dev/rules/react/jsx-uses-vars.md): Disallow variables used in JSX to be incorrectly marked as unused

---

Web page: https://lintradar.dev/rules/react/jsx-no-target-blank. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
