Skip to content

Commit 3b4c56a

Browse files
committed
[eslint config] [base] [deps] Switch to confusing-browser-globals
The `eslint-restricted-globals` package author created an equivalent package `confusing-browser-globals` that now resides within the create-react-app monorepo. In sidoshi/eslint-restricted-globals#2 @sidoshi suggested that we change eslint-config-airbnb-base to depend on the CRA package instead, in an effort to consolidate the two. Currently the two global lists are identical, so this does not change the generated eslint config: https://unpkg.com/[email protected]/index.js https://unpkg.com/[email protected]/index.js
1 parent da61c6e commit 3b4c56a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/eslint-config-airbnb-base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"node": ">= 4"
7272
},
7373
"dependencies": {
74-
"eslint-restricted-globals": "^0.1.1",
74+
"confusing-browser-globals": "^1.0.5",
7575
"object.assign": "^4.1.0",
7676
"object.entries": "^1.0.4"
7777
}

packages/eslint-config-airbnb-base/rules/variables.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const restrictedGlobals = require('eslint-restricted-globals');
1+
const confusingBrowserGlobals = require('confusing-browser-globals');
22

33
module.exports = {
44
rules: {
@@ -16,7 +16,7 @@ module.exports = {
1616
'no-label-var': 'error',
1717

1818
// disallow specific globals
19-
'no-restricted-globals': ['error', 'isFinite', 'isNaN'].concat(restrictedGlobals),
19+
'no-restricted-globals': ['error', 'isFinite', 'isNaN'].concat(confusingBrowserGlobals),
2020

2121
// disallow declaration of variables already declared in the outer scope
2222
'no-shadow': 'error',

0 commit comments

Comments
 (0)