[eslint-config-kibana] expand list of restricted globals (#15798)

This commit is contained in:
Spencer 2018-01-03 10:52:30 -07:00 committed by GitHub
parent d72c9a57ae
commit 28663f6f8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 64 additions and 1 deletions

View file

@ -1,3 +1,5 @@
const RESTRICTED_GLOBALS = require('./restricted_globals')
module.exports = {
parser: 'babel-eslint',
@ -59,7 +61,7 @@ module.exports = {
'no-path-concat': 'off',
'no-proto': 'error',
'no-redeclare': 'error',
'no-restricted-globals': [ 'error', 'context' ],
'no-restricted-globals': ['error', ...RESTRICTED_GLOBALS],
'no-return-assign': 'off',
'no-script-url': 'error',
'no-sequences': 'error',

View file

@ -0,0 +1,61 @@
// copied from https://github.com/facebookincubator/create-react-app/blob/2e82ebb3371731a5c4e346f310848ddb23fd0976/packages/eslint-config-react-app/index.js#L24
module.exports = [
'addEventListener',
'blur',
'close',
'closed',
'confirm',
'defaultStatus',
'defaultstatus',
'event',
'external',
'find',
'focus',
'frameElement',
'frames',
'history',
'innerHeight',
'innerWidth',
'length',
'location',
'locationbar',
'menubar',
'moveBy',
'moveTo',
'name',
'onblur',
'onerror',
'onfocus',
'onload',
'onresize',
'onunload',
'open',
'opener',
'opera',
'outerHeight',
'outerWidth',
'pageXOffset',
'pageYOffset',
'parent',
'print',
'removeEventListener',
'resizeBy',
'resizeTo',
'screen',
'screenLeft',
'screenTop',
'screenX',
'screenY',
'scroll',
'scrollbars',
'scrollBy',
'scrollTo',
'scrollX',
'scrollY',
'self',
'status',
'statusbar',
'stop',
'toolbar',
'top',
];