This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Improve prefer-array-literal rule #862
Merged
IllusionMH
merged 12 commits into
microsoft:master
from
IllusionMH:improve-prefer-array-literal-rule
May 17, 2019
Merged
Improve prefer-array-literal rule #862
IllusionMH
merged 12 commits into
microsoft:master
from
IllusionMH:improve-prefer-array-literal-rule
May 17, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IllusionMH
changed the title
Improve prefer array literal rule
[WIP] Improve prefer-array-literal rule
May 13, 2019
IllusionMH
force-pushed
the
improve-prefer-array-literal-rule
branch
from
May 14, 2019 00:10
c8ab85f
to
8bd02f7
Compare
IllusionMH
commented
May 14, 2019
IllusionMH
commented
May 14, 2019
IllusionMH
changed the title
[WIP] Improve prefer-array-literal rule
Improve prefer-array-literal rule
May 14, 2019
JoshuaKGoldberg
suggested changes
May 15, 2019
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.
Functionality LGTM! Just some comments around the options.
JoshuaKGoldberg
added
the
PR: Waiting for Author
Changes have been requested that the pull request author should address.
label
May 15, 2019
IllusionMH
commented
May 16, 2019
IllusionMH
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
May 16, 2019
Co-Authored-By: Josh Goldberg <joshuakgoldberg@outlook.com>
IllusionMH
force-pushed
the
improve-prefer-array-literal-rule
branch
from
May 17, 2019 01:08
762f7dc
to
cb4d3c7
Compare
IllusionMH
commented
May 17, 2019
JoshuaKGoldberg
approved these changes
May 17, 2019
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.
LGTM, thanks!
Thank you for feedback and review! |
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!
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR checklist
Array
from other namespace #856, fixes prefer-array-literal: how can one specify the size of the array? #822Overview of change:
Array
only likeArray
,window.Array
,global.Array
, andglobalThis.Array
. Other namespaces are allowed.Is there anything you'd like reviewers to focus on?
I haven't included
self
from Web Wrokers to list of restricted parents for property access expression because ofvar self = this
pattern. Should I includeself
too?Any suggesting what should trigger error for single parameter if type checker is not available?
I think that allowing everything without type checker (like ESLint does) and expect anything assignable to number if checker available will be good enough.
Code is ready for review,
but I still need to add options description to rule meta and update README.md with new option.