Skip to content

Commit

Permalink
[eslint-config] Add a message for confusing-browser-globals
Browse files Browse the repository at this point in the history
  • Loading branch information
vmohir authored Aug 21, 2023
1 parent 46ae3e2 commit 25799ba
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/eslint-config-airbnb-base/rules/variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ module.exports = {
message:
'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
},
].concat(confusingBrowserGlobals),
].concat(confusingBrowserGlobals.map(function (g) {
return {
name: g,
message:
"Use window." +
g +
" instead. https://github.com/facebook/create-react-app/blob/main/packages/confusing-browser-globals/README.md",
};
})),

// disallow declaration of variables already declared in the outer scope
'no-shadow': 'error',
Expand Down

0 comments on commit 25799ba

Please sign in to comment.