Closed jimmywarting closed 1 year ago
trying to assume that it exist globally is problematic for bundlers. it needs to scan the code if one is using globalThis.buffer and needs to decide if it have to polyfill it or not.
xo
forbids global bufferWhile the Buffer class is available within the global scope, it is still recommended to explicitly reference it via an import or require statement.
my own code can detect this kinds of patterns where ppl try to use globalThis.buffer and yours is one of them
As far as linting goes, this project uses eslint
and not xo
. Attempting to support arbitrary linters and linting configurations doesn't make sense.
Regarding the aforementioned links and notes about deprecating global Buffer
, that was only for ES modules. busboy
is a CJS module.
In any case i think you should attempt to only use Uint8Array instead of the overhead Buffer if at all possible.
In any case i think you should attempt to only use Uint8Array instead of the overhead Buffer if at all possible.
That's not very feasible considering:
Why?