Skip to content

Commit

Permalink
[eslint config] [base] [breaking] Blacklist confusing globals
Browse files Browse the repository at this point in the history
  • Loading branch information
sidoshi authored and ljharb committed May 20, 2017
1 parent 324bf9c commit 0dd3dbd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/eslint-config-airbnb-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,8 @@
},
"engines": {
"node": ">= 4"
},
"dependencies": {
"eslint-restricted-globals": "^0.1.1"
}
}
4 changes: 3 additions & 1 deletion packages/eslint-config-airbnb-base/rules/variables.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const restrictedGlobals = require('eslint-restricted-globals');

module.exports = {
rules: {
// enforce or disallow variable initializations at definition
Expand All @@ -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',
Expand Down

0 comments on commit 0dd3dbd

Please sign in to comment.