Skip to content

Violates "no new" lint rule #167

Description

@julix-unity

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions