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] function-component-definition: support namedComponents option being an array #3129

Conversation

petersendidit
Copy link
Contributor

@petersendidit petersendidit commented Nov 11, 2021

This adds support to the function-component-definition rule to have the
namedComponents and unnamedComponents options be an array.

… being an array

This adds support to the `function-component-definition`  rule to have the `namedComponents` rule be an array.
@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2021

Codecov Report

Merging #3129 (e3d3525) into master (d5bf8d9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3129   +/-   ##
=======================================
  Coverage   97.51%   97.51%           
=======================================
  Files         119      119           
  Lines        8129     8130    +1     
  Branches     2895     2895           
=======================================
+ Hits         7927     7928    +1     
  Misses        202      202           
Impacted Files Coverage Δ
lib/rules/function-component-definition.js 98.52% <100.00%> (+0.02%) ⬆️

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 d5bf8d9...e3d3525. Read the comment docs.

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.

Thanks, this is great. Let’s make the same change on unnamed components too.

lib/rules/function-component-definition.js Outdated Show resolved Hide resolved
docs/rules/function-component-definition.md Outdated Show resolved Hide resolved
@ljharb ljharb marked this pull request as draft November 15, 2021 07:02
@petersendidit petersendidit force-pushed the function-component-definitionArraynamedComponents branch from f19a402 to 2690c13 Compare November 15, 2021 17:03
@petersendidit petersendidit marked this pull request as ready for review November 15, 2021 17:04
@petersendidit petersendidit force-pushed the function-component-definitionArraynamedComponents branch 2 times, most recently from be8c167 to 7466db9 Compare November 17, 2021 17:00
@ljharb ljharb force-pushed the function-component-definitionArraynamedComponents branch from 7466db9 to e3d3525 Compare November 29, 2021 22:06
@ljharb ljharb changed the title [new] support namedComponents option being an array [New] support namedComponents option being an array Nov 29, 2021
@ljharb ljharb changed the title [New] support namedComponents option being an array [New] function-component-definition: support namedComponents option being an array Nov 29, 2021
@ljharb ljharb merged commit e3d3525 into jsx-eslint:master Nov 29, 2021
@petersendidit petersendidit deleted the function-component-definitionArraynamedComponents branch November 30, 2021 16:59
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.

3 participants