Skip to content

eslint-ignore masks undeclared result variable #21

@richjyoung

Description

@richjyoung

while((result = ANSIRegex.exec(text)) !== null) {

Whilst this works in the majority of cases, when bundled using esbuild via a package that references smartwrap as a dependency, this line causes:

ReferenceError: result is not defined

I think if the eslint-ignore lines were absent this would be caught by eslint, I can't see a reason to use a global variable here if it was intentional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions