Skip to content

Commit 11ab371

Browse files
vmohirljharb
authored andcommittedAug 21, 2023
[eslint config] [base] [patch] Add a message for confusing-browser-globals
1 parent 46ae3e2 commit 11ab371

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎packages/eslint-config-airbnb-base/rules/variables.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ module.exports = {
2828
message:
2929
'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
3030
},
31-
].concat(confusingBrowserGlobals),
31+
].concat(confusingBrowserGlobals.map((g) => ({
32+
name: g,
33+
message: `Use window.${g} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,
34+
}))),
3235

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

0 commit comments

Comments
 (0)
Failed to load comments.