Skip to content

Commit

Permalink
[eslint config] [base] [patch] Add a message for `confusing-browser-g…
Browse files Browse the repository at this point in the history
…lobals`
  • Loading branch information
vmohir authored and ljharb committed Aug 21, 2023
1 parent 46ae3e2 commit afe00a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 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,12 @@ 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/HEAD/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 afe00a7

Please sign in to comment.