-
-
Notifications
You must be signed in to change notification settings - Fork 203
fix: disallow extra properties in rule options #751
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
base: main
Are you sure you want to change the base?
fix: disallow extra properties in rule options #751
Conversation
|
WalkthroughThe update refines the JSON schema validation for the Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to 7aa6758 in 1 minute and 0 seconds. Click for details.
- Reviewed
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. eslint-plugin-prettier.js:169
- Draft comment:
Setting 'additionalProperties' to false here enforces strict validation for the second options object, preventing unnoticed typos. Ensure that allowing extra properties in the nested 'fileInfoOptions' (line 164-167) is intentional. - Reason this comment was not posted:
Comment looked like it was already resolved.
Workflow ID: wflow_GnEnsGcPuBrDPpsq
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
commit: |
The plugin rule currently allows extra properties to be passed in the second options object, which should not be allowed because they're not used by the rule, and this only makes it easier for typos in rule options to go unnoticed.
This PR simply disallows extra properties in this rule's schema.
Important
Disallows extra properties in the second options object of the
prettier
rule schema ineslint-plugin-prettier.js
.prettier
rule schema ineslint-plugin-prettier.js
.usePrettierrc
,fileInfoOptions
) are allowed, preventing unnoticed typos.This description was created by
for 7aa6758. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit
prettier
rule. Only explicitly defined options are now permitted; any extra properties will result in a validation error.