Skip to content

Files

Latest commit

 

History

History
25 lines (18 loc) · 467 Bytes

jsx-wrap-multiline.md

File metadata and controls

25 lines (18 loc) · 467 Bytes

Pattern: Malformed multi-line JSX element wrapping

Issue: -

Description

Enforces that multi-line JSX elements are wrapped with parentheses. Opening parenthesis must be followed by a newline, closing parenthesis must be preceded by a newline.

Example of incorrect code:

const button = <button type="submit">
    Submit
</button>;

Example of correct code:

const button = (
    <button type="submit">
        Submit
    </button>
);