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

[@typescript-eslint/no-unnecessary-type-arguments] type argument automatically removed #4569

Closed
Labels
duplicateThis issue or pull request already existspackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
@nandi95

Description

@nandi95

I have a type that has a type argument which has to extend a certain type.
When I pass this type argument, it figures:

ESLint: This is the default value for this type parameter, so it can be omitted.(@typescript-eslint/no-unnecessary-type-arguments)

However the type argument while extending the expected type it is a type with extra things on it.

possibly related to#1224 ?

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I haveread the FAQ and my problem is not listed.

Repro

1 - clonehttps://github.com/upfrontjs/framework
2 - update ts-lint packages to the latest
3 - runnpm run lint
The following should not have it's second type argument removed
https://github.com/upfrontjs/framework/blob/main/tests/Calliope/Factory/FactoryBuilder.test.ts#L17

{extends: ["eslint:recommended","plugin:@typescript-eslint/all"]}

Expected Result

Type argument not to be removed

Actual Result

Type argument is removed

Additional Info
After updating to 5.12.0 from 5.11.0 my type arguments are incorrectly being removed
The PR that caused this change:#4543
The release:https://github.com/typescript-eslint/typescript-eslint/releases/tag/v5.12.0

Versions

packageversion
@typescript-eslint/eslint-plugin5.12.0
@typescript-eslint/parser5.12.0
TypeScript4.5.5
ESLint8.9.0
node17.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existspackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    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