Skip to content

prefer-regexp-test: Support explicit test conditions #838

@DMartens

Description

@DMartens

Description
The rule prefer-regexp-test currently only supports implicit tests for the match (e.g. if (/regex/exec(string))) or boolean casts but not explicit tests (e.g. /regex/.exec(string) !== null).
This should be straightforward to implement in isUseBoolean.
I am willing to submit a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions