Skip to content

Add auto fixer for jsx-self-close-rule#189

Merged
adidahiya merged 1 commit intopalantir:masterfrom
QuentinBouygues:self-close-rule-fixer
Mar 13, 2019
Merged

Add auto fixer for jsx-self-close-rule#189
adidahiya merged 1 commit intopalantir:masterfrom
QuentinBouygues:self-close-rule-fixer

Conversation

@QuentinBouygues
Copy link
Contributor

Hi,

This PR adds an auto fixer for the jsxSelfClose rule, along with a test and readme update.

As we throw an error when there are no node children, the fix just keeps the opening element and makes him self-closing

I'll keep an eye on the PR if changes are needed ! 😄

@QuentinBouygues
Copy link
Contributor Author

Hi again, just coming back for an update, is there anything missing in the PR ?




<h2 class="colouring" contents="B"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

let's include a space right before the / here, to match what prettier would do with formatting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review, I added the space for all the self-closing tags. Is it ok ?

@adidahiya adidahiya merged commit 61e2f50 into palantir:master Mar 13, 2019
@adidahiya
Copy link
Contributor

thanks @QuentinBouygues! in the future, please avoid force-pushing and use additional commits instead (we squash at the end of a PR)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants