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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

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 (fcae98f) to head (aa84425).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1844      +/-   ##
==========================================
- Coverage   93.81%   93.80%   -0.02%     
==========================================
  Files         777      777              
  Lines       18867    18869       +2     
  Branches     4867     4869       +2     
==========================================
- Hits        17701    17700       -1     
- Misses       1090     1094       +4     
+ Partials       76       75       -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.

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.

2 participants