feat: Set type for RuleDefinition.defaultOptions#173
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the type definitions for ESLint rules by aligning default options with the rule options type for improved type validation.
- Added a new generic parameter, RuleOptions, to the RulesMeta interface.
- Changed the defaultOptions type to use the RuleOptions generic.
- Updated the RuleDefinition.meta property to include RuleOptions.
fasttime
reviewed
Mar 28, 2025
Member
fasttime
left a comment
There was a problem hiding this comment.
The changes look good to me. Can we add some type tests for meta.defaultOptions?
fasttime
reviewed
Mar 29, 2025
Co-authored-by: Francesco Trotta <github@fasttime.org>
Merged
1 task
snitin315
pushed a commit
that referenced
this pull request
Mar 29, 2026
Co-authored-by: Francesco Trotta <github@fasttime.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites checklist
What is the purpose of this pull request?
I realized that
defaultOptionscan be assigned the same type as the rule options for rules to allow for better type validation.What changes did you make? (Give an overview)
RulesMetato acceptRuleOptionsas an argumentdefaultOptionsto be the same type asRuleOptionsRelated Issues
Is there anything you'd like reviewers to focus on?