Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New] jsx-tag-spacing: Add multiline-always option #3260

Merged

Conversation

Nokel81
Copy link
Contributor

@Nokel81 Nokel81 commented Apr 1, 2022

  • This option enforces that the closingTag or the selfClosingTag is on a
    new line if the entire tag is a multiline tag

Fixes #3210.

- This option enforces that the closingTag or the selfClosingTag is on a
  new line if the entire tag is a multiline tag

Signed-off-by: Sebastian Malton <sebastian@malton.name>
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

tests/lib/rules/jsx-tag-spacing.js Outdated Show resolved Hide resolved
tests/lib/rules/jsx-tag-spacing.js Outdated Show resolved Hide resolved
tests/lib/rules/jsx-tag-spacing.js Outdated Show resolved Hide resolved
tests/lib/rules/jsx-tag-spacing.js Outdated Show resolved Hide resolved
@ljharb ljharb force-pushed the multiline-always-for-jsx-tag-spacing branch from 0ff8023 to 8513f1a Compare April 1, 2022 22:13
@ljharb ljharb changed the title Add multiline-always option for jsx-tag-spacing [New] jsx-tag-spacing: Add multiline-always option Apr 1, 2022
@ljharb ljharb merged commit 8513f1a into jsx-eslint:master Apr 1, 2022
@Nokel81 Nokel81 deleted the multiline-always-for-jsx-tag-spacing branch April 1, 2022 23:01
@Nokel81
Copy link
Contributor Author

Nokel81 commented Apr 5, 2022

Thanks for merging this, may I ask what if there is an eta for 7.29.5 (or more likely 7.30.0)?

@ljharb
Copy link
Member

ljharb commented Apr 5, 2022

it'd be 7.30, yes. and there's no ETA.

ljharb pushed a commit to Nokel81/eslint-plugin-react that referenced this pull request May 16, 2022
- If the node is multiline then require newline
- If the node is singleline then require space

Note: breaking wrt jsx-eslint#3260, but it’s unreleased.

Signed-off-by: Sebastian Malton <sebastian@malton.name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Is it possible to catch a single prop where the prop is a multiline object?
2 participants