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-max-props-per-line
: add multi/single line config options
#2769
Conversation
@@ -32,22 +48,23 @@ ruleTester.run('jsx-max-props-per-line', rule, { | |||
code: '<App foo />' | |||
}, { | |||
code: '<App foo bar />', | |||
options: [{maximum: 2}] | |||
options: [getConfigs(2)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not convinced this is clearer than just repeating each configuration inline. It's much harder for me to evaluate the test cases this way. Can you update this to remove getConfigs
?
lib/rules/jsx-max-props-per-line.js
Outdated
type: 'integer', | ||
minimum: 1 | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
}, | |
"additionalProperties": false |
(if i'm remembering the syntax right)
lib/rules/jsx-max-props-per-line.js
Outdated
maximum: { | ||
type: 'integer', | ||
minimum: 1 | ||
type: 'object', | ||
properties: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a breaking change unless it uses anyOf
or oneOf
to allow both an integer and an object.
jsx-max-props-per-line
: add multi/single line config options
Is anyone working on this? Can I take a shot at it? |
@dherault please go ahead. I'm a little busy with my office stuff. |
@dherault please do not open a new PR - please post a link here to a branch/commit, and I'll update this PR. |
Duplicate of #3078 |
Fixes #2735