Skip to content

jsx-wrap-multilines false negative within ternary #916

Closed
@SpainTrain

Description

@SpainTrain
/* eslint react/jsx-wrap-multilines:2 */
import React from 'react'

// error  Missing parentheses around multilines JSX
const bad =
    <div>
        <div />
    </div>

// no error
const erroneouslyPasses = true
    ? <div>
        <div />
    </div>
    : <div>
        <div />
    </div>

related to #790 #791 #874

Activity

tannerlinsley

tannerlinsley commented on May 15, 2017

@tannerlinsley

I'm still seeing this happen with all of my ternaries that include multi-line JSX :(
Using version ^4.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ljharb@SpainTrain@tannerlinsley

        Issue actions

          jsx-wrap-multilines false negative within ternary · Issue #916 · jsx-eslint/eslint-plugin-react