# jsx-wrap-multilines

Rule `react/jsx-wrap-multilines`. Disallow missing parentheses around multiline JSX

- Source: react
- Technologies: React
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 3.4M weekly downloads of presets that enable it
- Trend: +2.3% last quarter
- Rank: #1448 by reach, #1584 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `react/jsx-wrap-multilines` | no | safe | package `eslint-plugin-react` | [docs](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-wrap-multilines.md) |

## Code examples

### Incorrect: the rule reports this

```jsx
var Hello = createReactClass({
  render: function() {
    return <div>
      <p>Hello {this.props.name}</p>
    </div>;
  }
});
```

```jsx
var Hello = createReactClass({
  render: function() {
    return (<div>
      <p>Hello {this.props.name}</p>
    </div>);
  }
});
```

```jsx
var singleLineJSX = <p>Hello</p>

var Hello = createReactClass({
  render: function() {
    return (
      <div>
        <p>Hello {this.props.name}</p>
      </div>
    );
  }
});
```

### Correct: the rule accepts this

```jsx
var singleLineJSX = <p>Hello</p>

var Hello = createReactClass({
  render: function() {
    return (
      <div>
        <p>Hello {this.props.name}</p>
      </div>
    );
  }
});
```

```jsx
var singleLineJSX = <p>Hello</p>

var Hello = createReactClass({
  render: function() {
    return <div>
      <p>Hello {this.props.name}</p>
    </div>;
  }
});
```

```jsx
var hello = (
  <div>
    <p>Hello</p>
  </div>
);
```

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-wrap-multilines": "error",
    },
  },
];
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |

## Related rules

- [react/jsx-tag-spacing](https://lintradar.dev/rules/react/jsx-tag-spacing.md): Enforce whitespace in and around the JSX opening and closing brackets
- [react/no-access-state-in-setstate](https://lintradar.dev/rules/react/no-access-state-in-setstate.md): Disallow when this.state is accessed within setState
- [react/jsx-props-no-multi-spaces](https://lintradar.dev/rules/react/jsx-props-no-multi-spaces.md): Disallow multiple spaces between inline JSX props
- [react/no-arrow-function-lifecycle](https://lintradar.dev/rules/react/no-arrow-function-lifecycle.md): Lifecycle methods should be methods on the prototype, not class fields
- [react/jsx-one-expression-per-line](https://lintradar.dev/rules/react/jsx-one-expression-per-line.md): Require one JSX element per line
- [react/no-invalid-html-attribute](https://lintradar.dev/rules/react/no-invalid-html-attribute.md): Disallow usage of invalid attributes

---

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