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

feat(prefer-user-event-setup): adding new rule

Open gipcompany opened this issue 2 months ago • 1 comments

Checks

Changes

  • Add prefer-user-event-setup rule to encourage using userEvent.setup() pattern over direct method calls
  • Add comprehensive test coverage with 44 test cases covering various usage scenarios
  • Add documentation explaining the rule benefits and correct usage patterns
  • Update README.md with new rule entry in supported rules table

Context

Closes #646

gipcompany avatar Dec 10 '25 00:12 gipcompany

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 97.48%. Comparing base (3cc095b) to head (8510411). :warning: Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1125      +/-   ##
==========================================
+ Coverage   97.40%   97.48%   +0.07%     
==========================================
  Files          48       49       +1     
  Lines        5826     5997     +171     
  Branches     1477     1518      +41     
==========================================
+ Hits         5675     5846     +171     
  Misses        149      149              
  Partials        2        2              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Dec 10 '25 11:12 codecov[bot]

The rule must be manually exported in lib/rules/index.ts

This was addressed with 8510411d2fd094cbe418a569e8a122341f9fe437.

gipcompany avatar Dec 14 '25 23:12 gipcompany

@all-contributors please add @gipcompany for code, test, docs

Belco90 avatar Dec 15 '25 06:12 Belco90

@Belco90

I've put up a pull request to add @gipcompany! :tada:

allcontributors[bot] avatar Dec 15 '25 06:12 allcontributors[bot]

:tada: This PR is included in version 7.14.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Dec 15 '25 06:12 github-actions[bot]

awesome new rule. thx @gipcompany ❤️

bobaaaaa avatar Dec 15 '25 07:12 bobaaaaa