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
chore: re-enable no-undef rule for tests #974
Conversation
@@ -1,3 +1,4 @@ | |||
/* eslint-disable no-undef */ |
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.
Rather than entirely disabling the rule here, how about listing the globals actually used?
/* eslint-disable no-undef */ | |
/* global checkGlobal, checkSelf, checkThis, checkWindow */ |
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.
ahh, needs /* global someVar: write */
: and then another no-undef
disable above it 😄
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.
this is what made it work:
// eslint-disable-next-line no-unused-vars
/* global checkThis: true, checkSelf: true, checkWindow: true, checkGlobal: true */
a6e5b6e
to
84855d5
Compare
84855d5
to
c04d76c
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @boneskull and the rest of your teammates on Graphite |
c04d76c
to
c2896da
Compare
c2896da
to
eca93ff
Compare
I'm skeptical (as in, all undef warnings will be ignored anyway as we move forward, just with added manual labor) |
eca93ff
to
b483996
Compare
This needs #960 to pass CI, but I cannot target a branch in a fork.no-undef
was disabled because we use a lot of undefined variables, but it's better to create lint exceptions on a line-by-line or file-by-file basis, since it can cause the problem fixed in #960.