diff --git a/packages/eslint-config-airbnb-base/rules/variables.js b/packages/eslint-config-airbnb-base/rules/variables.js index 701340ab56..6fb98bcfb6 100644 --- a/packages/eslint-config-airbnb-base/rules/variables.js +++ b/packages/eslint-config-airbnb-base/rules/variables.js @@ -16,7 +16,19 @@ module.exports = { 'no-label-var': 'error', // disallow specific globals - 'no-restricted-globals': ['error', 'isFinite', 'isNaN'].concat(confusingBrowserGlobals), + 'no-restricted-globals': [ + 'error', + { + name: 'isFinite', + message: + 'Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite', + }, + { + name: 'isNaN', + message: + 'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan', + }, + ].concat(confusingBrowserGlobals), // disallow declaration of variables already declared in the outer scope 'no-shadow': 'error',