Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Expand prefer-array-literal rule #842

Merged
merged 2 commits into from
Mar 21, 2019

Conversation

drexler
Copy link
Contributor

@drexler drexler commented Mar 12, 2019

PR checklist

Overview of change:

Expands the prefer-array-literal rule to cover Array functions

Is there anything you'd like reviewers to focus on?

After implementing this change, react-a11y-titles test was was flagged by the rule update and i made some changes to it as part of this PR. I am unsure if it's appropriate to include those changes here or it should be part of another issue to address the breaking change. @JoshuaKGoldberg, @IllusionMH thoughts?

Copy link
Contributor

@IllusionMH IllusionMH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drexler thank you for PR! Rule/test code good 👍

I'm in favor of lint error fix in scope of this PR, however workaround for lint error can be greatly simplified.

src/tests/ReactA11yTitlesRuleTests.ts Outdated Show resolved Hide resolved
@IllusionMH IllusionMH added the PR: Waiting for Author Changes have been requested that the pull request author should address. label Mar 12, 2019
@JoshuaKGoldberg
Copy link

appropriate to include those changes here

As long as the rule works the same, let's fix it up! +1

@drexler
Copy link
Contributor Author

drexler commented Mar 12, 2019

Thanks for the review guys - PR update pushed.

@JoshuaKGoldberg JoshuaKGoldberg added PR: Waiting for Reviewer A repository maintainer should take a look at the pull request soon! and removed PR: Waiting for Author Changes have been requested that the pull request author should address. labels Mar 12, 2019
Copy link
Contributor

@IllusionMH IllusionMH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good! Thanks!

Copy link

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@JoshuaKGoldberg JoshuaKGoldberg merged commit 42fc13f into microsoft:master Mar 21, 2019
@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.1.1-beta milestone Apr 15, 2019
@IllusionMH IllusionMH modified the milestones: 6.1.1-beta, 6.2.0-beta May 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR: Waiting for Reviewer A repository maintainer should take a look at the pull request soon!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prefer-array-literal: catch new Array(10) but not Array(10)
3 participants