Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDSC-4076: Integrate a linter for react-testing-library before the number of those gets too large in EDSC #1844

Merged
merged 15 commits into from
Jan 23, 2025

Conversation

daniel-zamora
Copy link
Contributor

@daniel-zamora daniel-zamora commented Dec 13, 2024

Overview

What is the feature?

Adds react testing library eslint plugin to edsc

What is the Solution?

Added edsc specific configs to the lint config, the shared linter config updated version, and updated all the tests that were experiencing new linter errors

What areas of the application does this impact?

Component tests that use react testing library.

Testing

Reproduction steps

npm run lint

Attachments

Please include relevant screenshots or files that would be helpful in reviewing and verifying this change.

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@daniel-zamora daniel-zamora marked this pull request as ready for review December 16, 2024 18:35
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.80%. Comparing base (67a97c3) to head (709855b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1844      +/-   ##
==========================================
+ Coverage   93.78%   93.80%   +0.01%     
==========================================
  Files         778      778              
  Lines       18900    18902       +2     
  Branches     4885     4886       +1     
==========================================
+ Hits        17726    17731       +5     
+ Misses       1099     1095       -4     
- Partials       75       76       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@eudoroolivares2016 eudoroolivares2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do need to figure out why code-cov is missing some files

"static/src/js/**/*.js"
],
"rules": {
"testing-library/await-async-events": "off",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these be done in the linter package? otherwise EDSC might have a different setup than say MMT. Some of these feel like they aren't bad to ignore though I understand that it would make this PR even larger some comments on why we're doing these would be good to have though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is the point of the eslintrc, not all repos will want this, we need to exclude tests that haven't been converted from enzyme etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment explaining why these rules are being ignored

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could use a little background as to why all of these rules are being ignored. A comment explaining might be enough 😄

"static/src/js/**/*.js"
],
"rules": {
"testing-library/await-async-events": "off",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment explaining why these rules are being ignored

@trevorlang trevorlang self-requested a review January 7, 2025 20:25
@daniel-zamora daniel-zamora force-pushed the EDSC-4076 branch 3 times, most recently from e58ae2d to 49524ca Compare January 22, 2025 14:33
@macrouch macrouch requested a review from dpesall January 22, 2025 14:50
@daniel-zamora daniel-zamora merged commit 54ee5da into main Jan 23, 2025
11 checks passed
@daniel-zamora daniel-zamora deleted the EDSC-4076 branch January 23, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants