Bug: RuleCreator leaks internal meta.docs, meta.type types #8695
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
breaking change
This change will require a new major version to be released
bug
Something isn't working
Milestone
Before You File a Bug Report Please Confirm You Have Done The Following...
Relevant Package
utils
Playground Link
https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgUQMoBlgDsYFUbAA2AznAL5wBmUEIcA5AAIwCeYApsQMZTBgwBaToWwwA9AFcCJegG4AUPPYAPSLDhcIWYvCgTC7OAF4UGUfiLEAdACV97AMJR2AQxjQrAd2AwAFhCkAEQguYgAKBHk4DWc3djDNHBUYAEpEKOi4ZxgJKCx0zMyASQATdhxgSmB2KDCsCDK0yMLCxJhkq2c1GAi4EE5iFwBzdlKALjgAIhUXcANJgBo4erLyFIUW8gzosgyyBYyyyhd9GAB5fmAtYgmAbQBdA+j+mBcJ5sySkJuClrLuXiXLQTej0J4tZyaED9LBlEogyG0GFwsHbTIQPw1CYwPTscE7fF9AbDTjvNHRGZzdgTSZnXzLCAAQkmaP2aNYHBBhBcLACMFRhW4vnYIDecAeewOZHWiiAA
Repro Code
ESLint Config
tsconfig
Expected Result
Custom rules in community plugins shouldn't be tied into our types for what goes into a rule's
meta.docs
. Plugins might define their own, potentially different documentation metadata & strategies.Maybe we should make
meta.docs
type...Record<string, unknown>
for consumers? Or a type parameter onRuleCreator
that defaults toRecord<string, unknown>
?Actual Result
meta.docs.recommended
isRuleRecommended | undefined
in 7.2.0RuleRecommendation | RuleRecommendationAcrossConfigs<Options> | undefined
meta.docs.other
Additional Info
See also:
meta.docs.recommended
property will be visible to usersVersions
@typescript-eslint/utils
7.2.0
💖
The text was updated successfully, but these errors were encountered: