mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 23:37:55 -05:00
[eslint config] [base] [breaking] Blacklist confusing globals
This commit is contained in:
committed by
Jordan Harband
parent
324bf9c834
commit
0dd3dbd7b6
@@ -62,5 +62,8 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 4"
|
||||
},
|
||||
"dependencies": {
|
||||
"eslint-restricted-globals": "^0.1.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user