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-max-props-per-line: allow defining both multi and single line prop count #3078

Merged

Conversation

SIL0RAK
Copy link
Contributor

@SIL0RAK SIL0RAK commented Sep 19, 2021

Problem

You can only define single or multiple line prop count.

Solution

Allow to config rule to check both multiple and single line tags while maintaining backward compatibility.

@SIL0RAK SIL0RAK force-pushed the feat/jsx-max-props-per-line-dual-config branch from 262a8ae to 945c610 Compare September 19, 2021 15:21
lib/rules/jsx-max-props-per-line.js Show resolved Hide resolved
lib/rules/jsx-max-props-per-line.js Outdated Show resolved Hide resolved
@ljharb ljharb changed the title [Feat] jsx-max-props-per-line allow to define both multi and single line prop count [New] jsx-max-props-per-line: allow defining both multi and single line prop count Sep 19, 2021
@SIL0RAK SIL0RAK requested a review from ljharb September 20, 2021 18:02
@SIL0RAK SIL0RAK force-pushed the feat/jsx-max-props-per-line-dual-config branch from a800446 to eaf1bd4 Compare September 20, 2021 18:19
@ljharb ljharb force-pushed the feat/jsx-max-props-per-line-dual-config branch 2 times, most recently from 2d18878 to 83eb226 Compare September 20, 2021 23:14
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.

tweaked the implementation a bit. thanks!

@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2021

Codecov Report

Merging #3078 (83eb226) into master (95a8a4e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3078   +/-   ##
=======================================
  Coverage   97.55%   97.55%           
=======================================
  Files         115      115           
  Lines        7720     7729    +9     
  Branches     2757     2764    +7     
=======================================
+ Hits         7531     7540    +9     
  Misses        189      189           
Impacted Files Coverage Δ
lib/rules/jsx-max-props-per-line.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95a8a4e...83eb226. Read the comment docs.

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

Successfully merging this pull request may close these issues.

None yet

3 participants