Skip to content

RFC: new rule to prefer the usage of screen #95

@timdeschryver

Description

@timdeschryver

It's preferred to use screen when using the query functions.

// bad
const component = render()
component.getBy()

// good
screen.getBy()

For a first implementation we can verify that the queries used have screen as callee.
This doesn't take the following into account, but it makes the rule simpler.

const screen = render()
screen.getBy

Metadata

Metadata

Assignees

No one assigned

    Labels

    new ruleNew rule to be included in the pluginreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions