Skip to content

Wrong react/jsx-indent since 6.7.0 #966

Closed
@ibc

Description

@ibc

Using eslint-plugin-react 6.2.1, eslint does not complain about the following JSX code:

	{!state.localHold ?
		<PauseIcon
			onClick={this.handleHold.bind(this)}
		/>
	:
		<ResumeIcon
			onClick={this.handleResume.bind(this)}
		/>
	}

However, using 6.7.1, eslint complains:

93:9 error Expected indentation of 9 tab characters but found 8  (react/jsx-indent)

NOTE: line 93 is the one containing <ResumeIcon.

However, if I do the following, eslint does not complain:

	{!state.localHold ?
		<PauseIcon
			onClick={this.handleHold.bind(this)}
		/>
	:
			<ResumeIcon
				onClick={this.handleResume.bind(this)}
			/>
	}

This is obviously weird.

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

        @yannickcr@ibc

        Issue actions

          Wrong react/jsx-indent since 6.7.0 · Issue #966 · jsx-eslint/eslint-plugin-react