Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 743 Bytes

no-adjacent-inline-elements.md

File metadata and controls

26 lines (17 loc) · 743 Bytes

Disallow 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

Examples of incorrect code for this rule:

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

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

Examples of correct code for this rule:

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

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