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] add jsx-no-padded-children #2211

Closed
wants to merge 1 commit into from

Conversation

golopot
Copy link
Contributor

@golopot golopot commented Mar 22, 2019

Fixes #2045

The name of the rule mimics that of eslint rule padded-blocks. Don't know weather it is good or not.

I am concerned of the code duplication in functions checkPaddingTop and checkPaddingBottom, but cannot find a good way to solve it.

@golopot golopot force-pushed the jsx-no-padded-children branch 2 times, most recently from a02a634 to 53d581e Compare March 22, 2019 13:12
@golopot
Copy link
Contributor Author

golopot commented Apr 19, 2019

I am very unclear about how this rule should be designed.

  1. Maybe it should be named jsx-padded-children?
  2. Maybe it should be named jsx-children-newline, and do what other *-newline rules do (function-parens-newline, array-bracket-newline, object-curly-newline). However since the concern of Rule proposal: jsx-padded-children #2045 is about disallow empty line, this rule add an option to disallow empty lines, that is, only zero or one newline is allowed.

@ljharb
Copy link
Member

ljharb commented May 5, 2019

jsx-children-newline seems like a better name and model.

@golopot
Copy link
Contributor Author

golopot commented Jul 30, 2019

Closed this because I couldn't find a satisfactory solution.

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.

Rule proposal: jsx-padded-children
2 participants