Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
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.
Playground Link
Repro Code
exportconstx=0;exportconsty=0;// no error, works as expectedexporttypeIdent=<T>(x:T)=>T;// no error, works as expectedexportinterfaceObj{add:(x:number,y:number)=>number;}exportconstsomeFunc:{// error 'x' is already declared in the upper scope// error not expected<T>(x:T):T;// error 'x' is already declared in the upper scope// error 'y' is already declared in the upper scope// error not expected<T>(x:T,y:number):T|number;}=(a,b?:number)=>b??a;exportinterfaceIFunc{// error 'x' is already declared in the upper scope// error not expected<T>(x:T):T;// error 'x' is already declared in the upper scope// error 'y' is already declared in the upper scope// error not expected<T>(x:T,y:number):T|number;}exporttypeTFunc={// error 'x' is already declared in the upper scope// error not expected<T>(x:T):T;// error 'x' is already declared in the upper scope// error 'y' is already declared in the upper scope// error not expected<T>(x:T,y:number):T|number;}
ESLint Config
module.exports={"rules":{"@typescript-eslint/no-shadow":["error",{"ignoreTypeValueShadow":false,"ignoreFunctionTypeParameterNameValueShadow":true}]}}
tsconfig
{"compilerOptions": {"strictNullChecks":true }}Expected Result
withignoreFunctionTypeParameterNameValueShadow set to true,
expected no errors when shadowing variables in function interface parameters
Actual Result
withignoreFunctionTypeParameterNameValueShadow set to true,
received errors when shadowing variables in function interface parameters
Additional Info
was working as expected in v5.42.1, errors as of v5.43.0
Versions
| package | version |
|---|---|
@typescript-eslint/eslint-plugin | 5.44.0 |
@typescript-eslint/parser | 5.44.0 |
TypeScript | 4.8.4 |
ESLint | 8.15.0 |
node | web |