Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
fix(eslint-plugin): [no-shadow] report correctly on parameters of functions declared with thedeclare keyword#10543
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Changes fromall commits
a46ee96a94f1a7d1b6320dca1dc4ccc5073185bd8fdba147ba11528bFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -22,6 +22,10 @@ const allowedFunctionVariableDefTypes = new Set([ | ||
| AST_NODE_TYPES.TSCallSignatureDeclaration, | ||
| AST_NODE_TYPES.TSFunctionType, | ||
| AST_NODE_TYPES.TSMethodSignature, | ||
| AST_NODE_TYPES.TSEmptyBodyFunctionExpression, | ||
| AST_NODE_TYPES.TSDeclareFunction, | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Hi@ronami IMO, // "ignoreFunctionTypeParameterNameValueShadow": trueconstarg=0;declareconstFoo:{foo:(arg:number)=>void;new(arg:number):void;// 'arg' is already declared in the upper scope on line 2 column 7.}typeBar=new(arg:number)=>void;// 'arg' is already declared in the upper scope on line 2 column 7. MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Oh, definitely. Thank you@yeonjuan for catching this 👍 Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. @ronami oops. I just edited the comment. I think we should add MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Oh, I just went over the list of nodes to make sure I didn't miss anything 🙈 Thanks! Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. LGTM! Thanks! 👍 Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Thanks@yeonjuan for the catch! | ||
| AST_NODE_TYPES.TSConstructSignatureDeclaration, | ||
| AST_NODE_TYPES.TSConstructorType, | ||
| ]); | ||
| export default createRule<Options, MessageIds>({ | ||
Uh oh!
There was an error while loading.Please reload this page.