eslint-plugin-testing-library icon indicating copy to clipboard operation
eslint-plugin-testing-library copied to clipboard

new rule: no-container

Open nickserv opened this issue 6 years ago • 5 comments

Inspiration: Using container to query for elements

This would error on container methods like querySelector that are often used instead of get/query functions, as there might be other reasons why you'd need to access the container in a test (such as assertions). It would be nice to give suggestions of specific get/query functions as well, but I'm not sure how far we could get.

nickserv avatar Jun 17 '20 03:06 nickserv

Hi, everyone! I'd like to help implementing this rule, could I be assigned to it @nickmccurdy ?

thebinaryfelix avatar Jun 18 '20 18:06 thebinaryfelix

Sure, it's all yours 😄 You might want to review #165 as well because there were some mentions about this ticket.

gndelia avatar Jun 18 '20 18:06 gndelia

Thanks @gndelia !

thebinaryfelix avatar Jun 18 '20 18:06 thebinaryfelix

:tada: This issue has been resolved in version 4.0.0-beta.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Mar 28 '21 18:03 github-actions[bot]

:tada: This issue has been resolved in version 4.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Apr 11 '21 18:04 github-actions[bot]