Skip to content

Propose adding new rule prefer-equal #725

@heath-freenome

Description

@heath-freenome

This article puts forth a very strong argument to using toEqual() over toBe(). So this new rule would be triggered if code is using toBe() instead of toEqual() for comparing things like strings or plain objects. If the prefer-strict-boolean-matchers is enabled, it would NOT complain when toBe() is used with true or false inside of it, otherwise it could.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions