Skip to content

fix: disallow extra properties in rule options #1045

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

Conversation

andreww2012
Copy link
Contributor

Checks

Changes

Some rules, for example no-node-access currently allow extra properties to be passed in options object, which should not be allowed. This makes it easier for typos in rule options to go unnoticed.

This PR simply disallows extra properties in rules' schemas which currently allow them.

Context

@Belco90 Belco90 self-requested a review July 28, 2025 13:20
Copy link

codecov bot commented Jul 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.49%. Comparing base (35e2b40) to head (c34ebbe).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1045   +/-   ##
=======================================
  Coverage   96.48%   96.49%           
=======================================
  Files          49       49           
  Lines        2678     2679    +1     
  Branches     1107     1110    +3     
=======================================
+ Hits         2584     2585    +1     
  Misses         94       94           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@Belco90 Belco90 left a comment

Choose a reason for hiding this comment

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

I overlooked this PR! Thanks for your contribution @andreww2012 🙏

@Belco90 Belco90 merged commit a8f9555 into testing-library:main Jul 28, 2025
31 checks passed
@Belco90
Copy link
Member

Belco90 commented Jul 28, 2025

@all-contributors please add @andreww2012 for code

Copy link
Contributor

@Belco90

I've put up a pull request to add @andreww2012! 🎉

Copy link

🎉 This PR is included in version 7.6.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants