diff --git a/packages/eslint-config-basic/index.js b/packages/eslint-config-basic/index.js index 3e0c916..373a605 100644 --- a/packages/eslint-config-basic/index.js +++ b/packages/eslint-config-basic/index.js @@ -259,7 +259,23 @@ module.exports = { asyncArrow: 'always', }, ], - 'no-restricted-globals': ['error', { name: 'global', message: 'Use `globalThis` instead.' }], + 'no-restricted-globals': [ + 'error', + { name: 'global', message: 'Use `globalThis` instead.' }, + { name: 'self', message: 'Use `globalThis` instead.' }, + { name: 'window', message: 'Use `globalThis` instead.' }, + { name: 'isNaN', message: 'Use `Number.isNaN` instead' }, + { name: 'isFinite', message: 'Use `Number.isFinite` instead' }, + { name: 'parseFloat', message: 'Use `Number.parseFloat` instead' }, + { name: 'parseInt', message: 'Use `Number.parseInt` instead' }, + ], + 'no-restricted-properties': [ + 'error', + { object: 'globalThis', property: 'isNaN', message: 'Use `Number.isNaN` instead' }, + { object: 'globalThis', property: 'isFinite', message: 'Use `Number.isFinite` instead' }, + { object: 'globalThis', property: 'parseFloat', message: 'Use `Number.parseFloat` instead' }, + { object: 'globalThis', property: 'parseInt', message: 'Use `Number.parseInt` instead' }, + ], // es6 'no-var': 'error',