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-useless-constructor] handle parameter decorator#5450
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
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
3442fc5
78c7b1e
b012da0
2e7813f
File 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 |
---|---|---|
@@ -31,13 +31,15 @@ function checkAccessibility(node: TSESTree.MethodDefinition): boolean { | ||
} | ||
/** | ||
* Check if method is notuseless due to typescript parameter properties and decorators | ||
*/ | ||
function checkParams(node: TSESTree.MethodDefinition): boolean { | ||
return ( | ||
!node.value.params || | ||
!node.value.params.some( | ||
param => | ||
param.type === AST_NODE_TYPES.TSParameterProperty || | ||
param.decorators?.length, | ||
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. Aside: it might be the case that | ||
) | ||
); | ||
} | ||