From 25799ba8f27edbbd30648717bbade87425ffed81 Mon Sep 17 00:00:00 2001 From: Vahid Mohammadi Date: Mon, 21 Aug 2023 15:43:54 +0100 Subject: [PATCH] [eslint-config] Add a message for confusing-browser-globals --- packages/eslint-config-airbnb-base/rules/variables.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config-airbnb-base/rules/variables.js b/packages/eslint-config-airbnb-base/rules/variables.js index 6fb98bcfb6..55dfc5a78d 100644 --- a/packages/eslint-config-airbnb-base/rules/variables.js +++ b/packages/eslint-config-airbnb-base/rules/variables.js @@ -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',