# no-adjacent-inline-elements

Rule `react/no-adjacent-inline-elements`. Disallow adjacent inline elements not separated by whitespace.

- Source: react
- Technologies: React
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1882 by reach

## Linters

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

## Code examples

### Incorrect: the rule reports this

```jsx
<div><a></a><a></a></div>
<div><a></a><span></span></div>

React.createElement("div", undefined, [React.createElement("a"), React.createElement("span")]);
```

### Correct: the rule accepts this

```jsx
<div><div></div><div></div></div>
<div><a></a> <a></a></div>

React.createElement("div", undefined, [React.createElement("a"), " ", React.createElement("a")]);
```

Examples from the ESLint documentation.

## Enable it

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

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

export default [
  {
    plugins: { react },
    rules: {
      "react/no-adjacent-inline-elements": "error",
    },
  },
];
```

## Related rules

- [react/prefer-read-only-props](https://lintradar.dev/rules/react/prefer-read-only-props.md): Enforce that props are read-only
- [react/jsx-sort-props](https://lintradar.dev/rules/react/jsx-sort-props.md): Enforce props alphabetical sorting
- [react/require-optimization](https://lintradar.dev/rules/react/require-optimization.md): Enforce React components to have a shouldComponentUpdate method
- [react/sort-default-props](https://lintradar.dev/rules/react/sort-default-props.md): Enforce defaultProps declarations alphabetical sorting
- [react/jsx-newline](https://lintradar.dev/rules/react/jsx-newline.md): Require or prevent a new line after jsx elements and expressions.
- [react/sort-prop-types](https://lintradar.dev/rules/react/sort-prop-types.md): Enforce propTypes declarations alphabetical sorting

---

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