From 54a03fd0d37645846e002cda5c63491a841e09ae Mon Sep 17 00:00:00 2001 From: pooja-bruno Date: Tue, 15 Apr 2025 20:35:55 +0530 Subject: [PATCH] fix: lint errors for atob/btoa redefinition (#4509) * fix: lint errors for atob/btoa redefinition --- .../src/utils/codemirror/javascript-lint.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/bruno-app/src/utils/codemirror/javascript-lint.js b/packages/bruno-app/src/utils/codemirror/javascript-lint.js index 371fd2a30..88829322e 100644 --- a/packages/bruno-app/src/utils/codemirror/javascript-lint.js +++ b/packages/bruno-app/src/utils/codemirror/javascript-lint.js @@ -76,6 +76,18 @@ if (!SERVER_RENDERED) { return true; } + /* + * Filter out errors due to atob/btoa redefinition + * + * - W079: Redefinition of '{a}' + * This JSHint warning triggers when a variable name conflicts with a built-in global. + * We filter this for atob/btoa to allow explicit requires in Node.js environments + * where these browser functions might not be available. + */ + if (error.code === 'W079' && (error.a === 'atob' || error.a === 'btoa')) { + return false; + } + return true; });