Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 402 Bytes

jsx-when-require-condition.md

File metadata and controls

26 lines (17 loc) · 402 Bytes

When tag must contain condition attribute (jsx-when-require-condition)

Warn if When tag is missing condition attribute.

Rule Details

The following patterns are considered warnings:

<When>
    <div/>
</When>

The following patterns are not warnings:

<When condition={foo}>
    <div/>
</When>

When Not To Use It

If you are not using JSX, you can disable this rule