Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make sure no-unnecessary-act detects unnecessary act called before the render method #551

Open
Labels
enhancementNew feature or request
@fabiendem

Description

What rule do you want to change?

no-unnecessary-act

Does this change cause the rule to produce more or fewer warnings?

More warnings

How will the change be implemented?

I don't have a plan to implement the change yet.
The idea is to improve the rule no-unnecessary-act so it can detect unnecessary act which are called before a render.
https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-unnecessary-act.md
Those unnecessary make the codebase noisy.

Example code

act(() => {
 someSetupMethod();
});
render(<Example />);

How does the current rule affect the code?

This unnecessary act is not detected

How will the new rule affect the code?

This unnecessary act is detected

Anything else?

No response

Do you want to submit a pull request to change the rule?

Yes, but need help

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /