[eslint-config] [base] no-restricted-globals: add better messages

This commit is contained in:
Samuel Scheiderich
2020-10-24 16:30:10 -04:00
committed by Jordan Harband
parent 2c5c88d048
commit b30b0e4d91

View File

@@ -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',