-
Notifications
You must be signed in to change notification settings - Fork 53
Replace implementation of S4136 with 'consecutive-overloads' rule in sonarts #643
Conversation
09d77cf
to
979a7e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor comments
options: null, | ||
rspecKey: "RSPEC-4136", | ||
type: "functionality", | ||
typescriptOnly: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saberduck true
optionsDescription: "", | ||
options: null, | ||
rspecKey: "RSPEC-4136", | ||
type: "functionality", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saberduck maintanability
@@ -233,3 +233,7 @@ export function isVariableStatement(node: ts.Node): node is ts.VariableStatement | |||
export function isUnionOrIntersectionTypeNode(node: ts.Node): node is ts.UnionOrIntersectionTypeNode { | |||
return is(node, ts.SyntaxKind.UnionType, ts.SyntaxKind.IntersectionType); | |||
} | |||
|
|||
export function isSignatureDeclaration(node: ts.Node): node is ts.SignatureDeclaration { | |||
return "parameters" in node; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saberduck hm, is it reliable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the original implementation was something equivalent, they use this https://github.com/ajafff/tsutils/blob/master/typeguard/node.ts#L579
Fixes #469