Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Latest commit

 

History

History
32 lines (24 loc) · 488 Bytes

jsx-conditional-newline.md

File metadata and controls

32 lines (24 loc) · 488 Bytes

jsx-conditional-newline

When you have jsx conditionals, this rule enforces that you use a newline after the first clause.

Rule Details

The following patterns are considered problems:

/*eslint saxo/jsx-conditional-newline: "error"*/

return
    <a>
    {
        a && <b/>
    }
    </a>;

The following patterns are not considered warnings:

/*eslint saxo/jsx-conditional-newline: "error"*/

return
    <a>
    {
        a &&
            <b/>
    }
    </a>;