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: Type for values of SharedConfigs should allow an array #10213

Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: utilsIssues related to the @typescript-eslint/utils package
@trygveaa

Description

@trygveaa

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

No response

Repro Code

constplugin:TSESLint.FlatConfig.Plugin={configs:{},}plugin.configs={recommended:[{plugins:{example:plugin,},},],}

ESLint Config

No response

tsconfig

No response

Expected Result

The code should type check without errors. The code is a stripped down version of the example given onhttps://eslint.org/docs/latest/extend/plugins#configs-in-plugins except that I've replacedObject.assign with a direct assignment becauseObject.assign doesn't type check that it can be assigned.

You can see in that example that they set the recommended config to an array, but that's not allowed by theSharedConfigs type used byTSESLint.FlatConfig.Plugin["configs"]. If you replaceTSESLint.FlatConfig.Plugin withESLint.Plugin you can also see that it type checks without errors.

Actual Result

Type checking complains that an array can't be assigned to the typeConfig (the type for the values ofSharedConfigs).

Additional Info

No response

Versions

packageversion
@typescript-eslint/utils8.11.0
TypeScript5.6.3
ESLint9.13.0
node20.17.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: utilsIssues related to the @typescript-eslint/utils package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp