-
-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Add restricted globals package #2286
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
Conversation
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.
Shouldn't we have it in top level gitignore?
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.
Let's use this example:
function printStatus(stats) {
console.log(status);
}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 add use strict and standard license header.
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.
Let's make it 1.0
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.
Let's remove the lock here.
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.
Let's call it confusing-browser-globals.
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.
Let's instead test that it contains event as a sanity check.
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.
Let's make sure this test runs on our CI.
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.
Not sure how to do this. 😕
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 to update this too.
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.
and this
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.
Two spaces please.
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 use two spaces for indentation.
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 use semicolons.
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.
Nit: please use Array.isArray() instead.
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 title is still old.
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.
Sorry, UPDATING.
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.
Actually, would you mind changing this to use Jest for testing?
We don't use it in integration tests because of some obscure jsdom issue but it would be great to dogfood it in other places.
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.
Okay, but I don't know how to work with CI tests.
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 just mean that instead of calling mocha you could call jest (and add it to dependencies).
And replace assertions with Jest syntax:
expect(Array.isArray(globals)).toBe(true);* Add restricted globals package * Use new package in eslint-config * Add eslint-restricted-globals dependency * Fixes * Update dependencies * Update test and README * Use jest * tweaks * Add lint/test to CI * Fix lint
* Add restricted globals package * Use new package in eslint-config * Add eslint-restricted-globals dependency * Fixes * Update dependencies * Update test and README * Use jest * tweaks * Add lint/test to CI * Fix lint
* Add restricted globals package * Use new package in eslint-config * Add eslint-restricted-globals dependency * Fixes * Update dependencies * Update test and README * Use jest * tweaks * Add lint/test to CI * Fix lint
* Add restricted globals package * Use new package in eslint-config * Add eslint-restricted-globals dependency * Fixes * Update dependencies * Update test and README * Use jest * tweaks * Add lint/test to CI * Fix lint
* Add restricted globals package * Use new package in eslint-config * Add eslint-restricted-globals dependency * Fixes * Update dependencies * Update test and README * Use jest * tweaks * Add lint/test to CI * Fix lint
* Add restricted globals package * Use new package in eslint-config * Add eslint-restricted-globals dependency * Fixes * Update dependencies * Update test and README * Use jest * tweaks * Add lint/test to CI * Fix lint
* Add restricted globals package * Use new package in eslint-config * Add eslint-restricted-globals dependency * Fixes * Update dependencies * Update test and README * Use jest * tweaks * Add lint/test to CI * Fix lint
Add restricted globals in a separate package.