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 11ab371
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 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,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',
Expand Down

0 comments on commit 11ab371

Please sign in to comment.