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.
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
Add
prefer-global-this
rule #2410Add
prefer-global-this
rule #2410Changes from 62 commits
b262df1
23b9b18
63333a2
f2c4c6a
cdace67
77d99d4
957f54a
d7b725d
e8f791f
fc0a9be
6021d48
b91e840
c26d60b
b60b2b3
83419f1
b6e2890
287ee97
c2289b1
1368a75
9689cae
c8e4217
1543ced
588e158
71fdcd8
27d7096
b9cc588
fecdfff
b258aa1
45b5a99
0bc477d
a7bbe9f
7bb73ec
8be6891
e15c213
abaffc2
ffc9b46
a105b89
91cd643
8cc0c79
8678b45
c83eb91
cd0dacb
dcaccbb
5e85ec3
8fe496a
3b8e20f
18e1f1b
453232b
ac7a9b8
d5a63e7
4bdfb10
d00d870
45dd21c
0680206
56aed7e
13d9d89
29d89e5
1575cd8
75472c5
2f83ffe
b96dbe9
b76d424
b5dc66f
640c84b
c73d1e5
a3a15bb
12fe9a4
84147cd
496483e
775288d
8922b37
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
why allowing
self.location
in workers but notwindow.location
?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.
See #2458
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.
Need add
!node.computed
here, don't forgot to test.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.
I think
!node.computed
should not be added here, or am I missing some case?.Regardless of whether it is a computed property or not, this rule should be applied.
There is the test that we already have
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.
window[title]
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.
There is no difference between
window[title]
andwindow[foo]
Both
title
andfoo
are variable accesses. test added.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.
window[name]
doesn't mean it's accessingwindow.name
, sincename
can be other values.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.
We are not checking
window
isMemberExpression.object
either,foo[window]
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.
Please don't click
resolve
button, I can't find my comment.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.
The test added in 4be4699