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
Support globalThis #12670
Comments
I've created #12671 for basic support of the global in the environment. Now I think about it a little more, I'm not sure if there's more follow-up work that ESLint will need to do to understand variables created via |
Agreed that we should update this. We'll also have to check and see if we need to update any of our core rules to account for this. |
I added this to There are several rules we need to update. For example, the rules that check |
Is someone working on it? :) |
@mysticatea some of the rules you listed in this comment are checking Should these rules now explicitly pass "globalThis" in |
@yeonjuan Probably not. I published an |
Ok, I'll try it. :) |
PR #12774 |
* support globalThis in no-alert (ref #12670) * support globalThis in no-eval (ref #12670) * bump eslint-utils to ^2.0.0 (ref #12670) * add globalThis test cases in require-unicode-regexp (ref #12670) * add globalThis test cases in prefer-regex-literals (ref #12670) * add globalThis test cases in prefer-object-spread (ref #12670) * add globalThis test cases in prefer-named-capture-group (ref #12670) * add globalThis test cases in prefer-exponentiation-operator (ref #12670) * add globalThis test cases in no-misleading-character-class (ref #12670) * edit test cases in no-eval * support globalThis in no-obj-calls (ref #12670) * add globalThis test cases in no-redeclare (#12670) * change to use getPropertyName * fix tpo * add messageID - unexpectedRefCall
* support globalThis in no-alert (ref eslint#12670) * support globalThis in no-eval (ref eslint#12670) * bump eslint-utils to ^2.0.0 (ref eslint#12670) * add globalThis test cases in require-unicode-regexp (ref eslint#12670) * add globalThis test cases in prefer-regex-literals (ref eslint#12670) * add globalThis test cases in prefer-object-spread (ref eslint#12670) * add globalThis test cases in prefer-named-capture-group (ref eslint#12670) * add globalThis test cases in prefer-exponentiation-operator (ref eslint#12670) * add globalThis test cases in no-misleading-character-class (ref eslint#12670) * edit test cases in no-eval * support globalThis in no-obj-calls (ref eslint#12670) * add globalThis test cases in no-redeclare (eslint#12670) * change to use getPropertyName * fix tpo * add messageID - unexpectedRefCall
@yeonjuan thank you for implementing most of this in #12774! I realize we merged it before #12775 so you didn't have a chance to add |
I'm still seeing From reading the release notes, I thought support for |
Do you have the |
@kaicataldo Ah, that was the missing piece. Thanks a lot! |
The version of ESLint you are using. 6.7.2
The problem you want to solve.
globalThis
is now a tc 39 stage 4 proposal. ESLint should now be updated to recognise this.Your take on the correct solution to problem.
Update the environment list to add
globalThis
Are you willing to submit a pull request to implement this change? Yes
The text was updated successfully, but these errors were encountered: