Skip to content

no-useless-not is unaware of enabled/visible parameter #260

Closed
@karyon

Description

@karyon

this reports "Unexpected usage of not.toBeVisible(). Use toBeHidden() instead", but only toBeVisible has the parameter.

let visible = false;
// reports no-useless-not
await expect(page.locator('#selector')).not.toBeVisible({ visible });

same for toBeEnabled.

The lint was added in #81. Shortly thereafter, playwright 1.26 was released which added these parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions