[eslint config] [base] [patch] Add a message for confusing-browser-globals

This commit is contained in:
Vahid Mohammadi
2023-08-21 15:43:54 +01:00
committed by Jordan Harband
parent 46ae3e2256
commit 11ab37144b

View File

@@ -28,7 +28,10 @@ module.exports = {
message:
'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
},
].concat(confusingBrowserGlobals),
].concat(confusingBrowserGlobals.map((g) => ({
name: g,
message: `Use window.${g} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,
}))),
// disallow declaration of variables already declared in the outer scope
'no-shadow': 'error',