Skip to content

Commit bfa20fd

Browse files
yangmingshansindresorhus
andcommittedOct 18, 2019
Disable some confusing browser globals (#58)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
1 parent 0de1d43 commit bfa20fd

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
 

‎browser.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
'use strict';
22
const path = require('path');
3+
const confusingBrowserGlobals = require('confusing-browser-globals');
34

45
module.exports = {
56
extends: path.join(__dirname, 'index.js'),
67
env: {
78
node: false,
89
browser: true
10+
},
11+
rules: {
12+
'no-restricted-globals': [
13+
'error',
14+
...confusingBrowserGlobals
15+
]
916
}
1017
};

‎package.json

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
"hint",
5050
"simple"
5151
],
52+
"dependencies": {
53+
"confusing-browser-globals": "1.0.9"
54+
},
5255
"devDependencies": {
5356
"ava": "^2.3.0",
5457
"eslint": "^6.4.0",

0 commit comments

Comments
 (0)
Please sign in to comment.