Describe the bug
The regular use of this starts with new Compressor without storing the result (since the main effect is in side effect).
From ESLint docs https://eslint.org/docs/latest/rules/no-new
In this case, the created object is thrown away because its reference isn’t stored anywhere, and in many cases, this means that the constructor should be replaced with a function that doesn’t require new to be used.
What lead to using new rather than just importing some kind of function like compress() or equivalent?
Describe the bug
The regular use of this starts with
new Compressorwithout storing the result (since the main effect is in side effect).From ESLint docs https://eslint.org/docs/latest/rules/no-new
What lead to using
newrather than just importing some kind of function likecompress()or equivalent?