-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Getting no-unused-vars
on constructor parameters after upgrading to the latest version of typescript
and eslint
#2971
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
Comments
I have the similar issue with random eslint problems after upgrade, including you described.
I have found out that the problem is in I think this is a bug in a parser which can be discovered in code with decorators. |
@gavrashenko Yeah I had the same problem too but turning it off as this point in FAQ suggested fixed the issue.
|
Please, please, please use the search for open AND closed issues. This issue has been fixed, and has been raised about 10 times over the last week. |
@bradzacher I can feel the frustration you have but believe me I've searched the issues and the FAQs but I couldn't find any.. |
The first 9 issues in this search for the phrase "no-unused-vars" are from the past 7 days. #2946, #2947, #2950, #2957, #2961, #2967, #2969 |
I have an issue after I upgraded to the latest version of TypeScript, ESLint & @typescript-eslint/eslint-plugin I didn't have it before upgrading.
Now every time I execute the lint command I get a list of
no-unused-vars
errors for used imports & constructor properties, also issues in enums. All of these problem didn't exist before the upgrade.The versions I had before the upgrade are:
@typescript-eslint/eslint-plugin
3.7.1
@typescript-eslint/parser
3.7.1
TypeScript
3.9.7
node
14.15.0
npm
6.14.8
Repro
Here's my files I'm using:
.eslintrc
calendar.contorller.ts
tsconfig.json
Expected Result
I expect not to have any error.
Actual Result
A you see in the code I shared
BookingHistoryResponseDto
is used in the return type of the functiongetSchedule
.also the
service
parameter is initialized implicitly and should not raise this error.Additional Info
this is the command I'm running
eslint "{src,apps,libs,test}/**/*.ts" --fix
Versions
@typescript-eslint/eslint-plugin
4.14.0
@typescript-eslint/parser
4.14.0
@typescript-eslint/typescript-estree
4.14.0
@typescript-eslint/experimental-utils
4.14.0
TypeScript
4.1.3
node
14.15.0
npm
6.14.8
The text was updated successfully, but these errors were encountered: