[eslint config] [base] [breaking] Blacklist confusing globals

This commit is contained in:
Siddharth Doshi
2017-05-20 15:41:37 +05:30
committed by Jordan Harband
parent 324bf9c834
commit 0dd3dbd7b6
2 changed files with 6 additions and 1 deletions

View File

@@ -62,5 +62,8 @@
},
"engines": {
"node": ">= 4"
},
"dependencies": {
"eslint-restricted-globals": "^0.1.1"
}
}

View File

@@ -1,3 +1,5 @@
const restrictedGlobals = require('eslint-restricted-globals');
module.exports = {
rules: {
// enforce or disallow variable initializations at definition
@@ -14,7 +16,7 @@ module.exports = {
'no-label-var': 'error',
// disallow specific globals
'no-restricted-globals': 'off',
'no-restricted-globals': ['error'].concat(restrictedGlobals),
// disallow declaration of variables already declared in the outer scope
'no-shadow': 'error',