Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug: RuleCreator leaks internal meta.docs, meta.type types #8695

Closed
Assignees
JoshuaKGoldberg
Labels
accepting prsGo ahead, send a pull request that resolves this issuebreaking changeThis change will require a new major version to be releasedbugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
Milestone
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I havesearched for related issues and found none that matched my issue.
  • I haveread the FAQ and my problem is not listed.

Relevant Package

utils

Playground Link

https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgUQMoBlgDsYFUbAA2AznAL5wBmUEIcA5AAIwCeYApsQMZTBgwBaToWwwA9AFcCJegG4AUPPYAPSLDhcIWYvCgTC7OAF4UGUfiLEAdACV97AMJR2AQxjQrAd2AwAFhCkAEQguYgAKBHk4DWc3djDNHBUYAEpEKOi4ZxgJKCx0zMyASQATdhxgSmB2KDCsCDK0yMLCxJhkq2c1GAi4EE5iFwBzdlKALjgAIhUXcANJgBo4erLyFIUW8gzosgyyBYyyyhd9GAB5fmAtYgmAbQBdA+j+mBcJ5sySkJuClrLuXiXLQTej0J4tZyaED9LBlEogyG0GFwsHbTIQPw1CYwPTscE7fF9AbDTjvNHRGZzdgTSZnXzLCAAQkmaP2aNYHBBhBcLACMFRhW4vnYIDecAeewOZHWiiAA

Repro Code

import{ESLintUtils}from'@typescript-eslint/utils';exportconstrule=ESLintUtils.RuleCreator.withoutDocs({create(context){return{Identifier(node){context.report({messageId:"example", node});}}},defaultOptions:[],meta:{docs:{description:'',recommended:'recommended',other:true,},messages:{example:"Oh no!"},type:'layout',schema:[]},});

ESLint Config

n/a

tsconfig

n/a

Expected Result

Custom rules in community plugins shouldn't be tied into our types for what goes into a rule'smeta.docs. Plugins might define their own, potentially different documentation metadata & strategies.

Maybe we should makemeta.docs type...Record<string, unknown> for consumers? Or a type parameter onRuleCreator that defaults toRecord<string, unknown>?

Actual Result

Additional Info

See also:

Versions

packageversion
@typescript-eslint/utils7.2.0

💖

Metadata

Metadata

Labels

accepting prsGo ahead, send a pull request that resolves this issuebreaking changeThis change will require a new major version to be releasedbugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp