Skip to content
This repository was archived by the owner on Feb 9, 2022. It is now read-only.

Latest commit

 

History

History
24 lines (16 loc) · 710 Bytes

File metadata and controls

24 lines (16 loc) · 710 Bytes

Prevent adjacent inline elements not separated by whitespace. (react/no-adjacent-inline-elements)

Adjacent inline elements not separated by whitespace will bump up against each other when viewed in an unstyled manner, which usually isn't desirable.

Rule Details

The following patterns are considered warnings:

<div><a></a><a></a></div>
<div><a></a><span></span></div>

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

The following patterns are not considered warnings:

<div><div></div><div></div></div>
<div><a></a> <a></a></div>

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