File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
packages/eslint-plugin-typescript/lib/rules Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,7 @@ module.exports = {
49
49
}
50
50
case 'TSDeclareFunction' :
51
51
case 'FunctionDeclaration' :
52
- case 'TSNamespaceFunctionDeclaration' :
53
- case 'TSEmptyBodyFunctionDeclaration' : {
52
+ case 'TSNamespaceFunctionDeclaration' : {
54
53
return member . id && member . id . name ;
55
54
}
56
55
case 'TSMethodSignature' : {
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ module.exports = {
66
66
67
67
return {
68
68
'TSInterfaceBody > TSConstructSignatureDeclaration' ( node ) {
69
- if ( isMatchingParentType ( node . parent . parent , node . typeAnnotation ) ) {
69
+ if ( isMatchingParentType ( node . parent . parent , node . returnType ) ) {
70
70
// constructor
71
71
context . report ( {
72
72
node,
@@ -84,7 +84,7 @@ module.exports = {
84
84
if (
85
85
node . value &&
86
86
( node . value . type === 'TSEmptyBodyFunctionExpression' ||
87
- node . value . type === 'TSEmptyBodyFunctionDeclaration' )
87
+ ( node . value . type === 'TSDeclareFunction' && ! node . value . body ) )
88
88
) {
89
89
if ( isMatchingParentType ( node . parent . parent , node . value . returnType ) ) {
90
90
context . report ( {
You can’t perform that action at this time.
0 commit comments