testing-library / testing-library/eslint-plugin-testing-library
Make sure `no-unnecessary-act` detects unnecessary `act` called before the `render` method
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 168
- Avg merge
- 15h 44m
- Merged PRs (30d)
- 14
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the no-unnecessary-act rule documentation linked in the issue, then locate the rule implementation and its existing coverage. The change is complete when an unnecessary act call before render is reported without incorrectly flagging necessary usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, typescript
- Domain
- testing-qa, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100