diff --git a/lib/eslint.config_partial.mjs b/lib/eslint.config_partial.mjs index 2dc041ce893ae3..c4df9b191d8d05 100644 --- a/lib/eslint.config_partial.mjs +++ b/lib/eslint.config_partial.mjs @@ -13,12 +13,12 @@ const noRestrictedSyntax = [ selector: "CallExpression[callee.object.name='assert']:not([callee.property.name='ok']):not([callee.property.name='fail']):not([callee.property.name='ifError'])", message: 'Only use simple assertions', }, - // Forbids usages of `btoa` like: - // ``` - // const { btoa } = internalBinding('buffer'); - // btoa('...'); - // ``` { + // Forbids usages of `btoa` that are not caught by no-restricted-globals, like: + // ``` + // const { btoa } = internalBinding('buffer'); + // btoa('...'); + // ``` selector: "CallExpression[callee.property.name='btoa'], CallExpression[callee.name='btoa']", message: "`btoa` supports only latin-1 charset, use Buffer.from(str).toString('base64') instead", },