You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this change cause the rule to produce more or fewer warnings?
Fewer warnings
How will the change be implemented?
When eslint is run with the --fix flag, the plugin will:
replace the method in violation
auto import the expected method, if needed:
Example code
// current codeconst{getByTestId}=render(<Thing/>);expect(getByTestId("awesome-test-id")).not.toBeInTheDocument()// will then get replaced toconst{getByTestId, queryByTestId}=render(<Thing/>);expect(queryByTestId("awesome-test-id")).not.toBeInTheDocument()
How does the current rule affect the code?
Code isn't fixed automatically 🫤
How will the new rule affect the code?
It will be auto-fixed 🎉
Anything else?
No response
Do you want to submit a pull request to change the rule?
Yes
The text was updated successfully, but these errors were encountered:
I've implemented the fixer and got it working as intended (i think)
im having some issues with the current unit tests as createRuleTester() seems to be autofixing it, producing a plethora of the following errors:
Expected value to strictly be equal to:
"expect(screen.queryByTestId('Hello')).not.toBeNull()"
Received:
"expect(screen.getByTestId('Hello')).not.toBeNull()"
Is it possible to run the unit tests without --fix, so i can ensure I haven't changed the current behaviour?
What rule do you want to change?
prefer-presence-queries
Does this change cause the rule to produce more or fewer warnings?
Fewer warnings
How will the change be implemented?
When eslint is run with the --fix flag, the plugin will:
Example code
How does the current rule affect the code?
Code isn't fixed automatically 🫤
How will the new rule affect the code?
It will be auto-fixed 🎉
Anything else?
No response
Do you want to submit a pull request to change the rule?
Yes
The text was updated successfully, but these errors were encountered: