fix: lint errors for atob/btoa redefinition (#4509)

* fix: lint errors for atob/btoa redefinition
This commit is contained in:
pooja-bruno 2025-04-15 20:35:55 +05:30 committed by GitHub
parent e8affcfde9
commit 54a03fd0d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
});