Skip to content

Commit

Permalink
update linting settings
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Mar 1, 2021
1 parent aa20353 commit 11f70dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';
const SUPPORTED_NODE_VERSIONS = require('./packages/core-js-builder/package.json').engines.node;
const RESTRICTED_GLOBALS = require('confusing-browser-globals');
const SUPPORTED_NODE_VERSIONS = require('core-js-builder/package').engines.node;

const base = {
// possible errors:
Expand Down Expand Up @@ -51,6 +52,8 @@ const base = {
'no-prototype-builtins': 'error',
// disallow multiple spaces in a regular expression literal
'no-regex-spaces': 'error',
// disallow specific global variables
'no-restricted-globals': ['error', ...RESTRICTED_GLOBALS],
// disallow returning values from setters
'no-setter-return': 'error',
// disallow sparse arrays
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"babel-loader": "^8.2.2",
"babel-plugin-transform-es2015-modules-simple-commonjs": "~0.3.0",
"babel-plugin-transform-for-of-as-array": "^1.1.1",
"confusing-browser-globals": "^1.0.10",
"core-js": "file:./packages/core-js",
"core-js-builder": "file:./packages/core-js-builder",
"core-js-compat": "file:./packages/core-js-compat",
Expand Down
1 change: 1 addition & 0 deletions packages/core-js/internals/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports =
/* global globalThis -- safe */
check(typeof globalThis == 'object' && globalThis) ||
check(typeof window == 'object' && window) ||
// eslint-disable-next-line no-restricted-globals -- safe
check(typeof self == 'object' && self) ||
check(typeof global == 'object' && global) ||
// eslint-disable-next-line no-new-func -- fallback
Expand Down

0 comments on commit 11f70dd

Please sign in to comment.