Skip to content

πŸ“Ž Add ability to configure (dis)allowed assertion function name patterns for lint/nursery/useExpectΒ #9218

@Bertie690

Description

@Bertie690

Description

While #9168, #9172 and #9178 cover the default allowances of lint/nursery/useExpect being sub-par, the larger issue at hand is that there is no way for the user to specify what does or doesn't count as an "assertion" function.

I think the easiest way to express this in a JSON schema would be matching individual function/method names to a "list of allowed ways you can/can't call this". (That being said, I'm no expert on this stuff, so feel free to use an alternate impl. if that would be simpler.)

Related to #9174 (which would be solvable fairly easily by simply defaulting all non-assertion Vitest provides on expect as not valid assertions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions