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 Sep 19, 2021
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 Sep 20, 2021
@SIL0RAK SIL0RAK force-pushed the feat/jsx-max-props-per-line-dual-config branch from a800446 to eaf1bd4 Sep 20, 2021
@ljharb ljharb force-pushed the feat/jsx-max-props-per-line-dual-config branch 2 times, most recently from 2d18878 to 83eb226 Sep 20, 2021
ljharb
ljharb approved these changes Sep 20, 2021
Copy link
Collaborator

@ljharb ljharb left a comment

tweaked the implementation a bit. thanks!

@codecov-commenter
Copy link

@codecov-commenter 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.

@ljharb ljharb merged commit 83eb226 into yannickcr:master Sep 21, 2021
193 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants