mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
[eslint-config] [base] no-restricted-globals: add better messages
This commit is contained in:
committed by
Jordan Harband
parent
2c5c88d048
commit
b30b0e4d91
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user