Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
nandi95 opened this issue Feb 17, 2022 · 1 comment
Closed
3 tasks done
Labels
duplicate This issue or pull request already exists package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@nandi95
Copy link

nandi95 commented Feb 17, 2022

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 have read the FAQ and my problem is not listed.

Repro

1 - clone https://github.com/upfrontjs/framework
2 - update ts-lint packages to the latest
3 - run npm 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

package version
@typescript-eslint/eslint-plugin 5.12.0
@typescript-eslint/parser 5.12.0
TypeScript 4.5.5
ESLint 8.9.0
node 17.5.0
@nandi95 nandi95 added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Feb 17, 2022
nandi95 added a commit to nandi95/framework-1 that referenced this issue Feb 17, 2022
nandi95 added a commit to upfrontjs/framework that referenced this issue Feb 17, 2022
## Feature
* feat(collection): added `chunkBy` method

## Fix
* fix(services)(**BREAKING CHANGE**): updated default `arrayFormat`
  * previous configuration caused query string structure issues by not specifying array indexes
* fix(model): removed unnecessary `resetQueryParameters` in `findMany`

## Documentation
* docs(collection): documented `chunkBy` method

## Chore
* chore: incremented version
* chore(deps-dev): locked ts eslint version
  * Locked while the following resolves:
  * typescript-eslint/typescript-eslint#4569

## Performance
* perf(collection): removed redundant construct calls

## Continuous Integration
* ci: added remote before pushing
* ci: run build test on PRs going into main too
nandi95 added a commit to upfrontjs/framework that referenced this issue Feb 17, 2022
## Feature 
* feat(collection): added `chunkBy` method 
 
## Fix 
* fix(services)(**BREAKING CHANGE**): updated default `arrayFormat` 
  * previous configuration caused query string structure issues by not specifying array indexes 
* fix(model): removed unnecessary `resetQueryParameters` in `findMany` 
 
## Documentation 
* docs(collection): documented `chunkBy` method 
 
## Chore 
* chore: incremented version 
* chore(deps-dev): locked ts eslint version 
  * Locked while the following resolves: 
  * typescript-eslint/typescript-eslint#4569 
 
## Performance 
* perf(collection): removed redundant construct calls 
 
## Continuous Integration 
* ci: added remote before pushing 
* ci: run build test on PRs going into main too
@bradzacher
Copy link
Member

Duplicate of #4554

@bradzacher bradzacher added duplicate This issue or pull request already exists and removed triage Waiting for maintainers to take a look labels Feb 17, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

No branches or pull requests

2 participants