File tree Expand file tree Collapse file tree 2 files changed +3
-80
lines changed
Expand file tree Collapse file tree 2 files changed +3
-80
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1111 * from any public method.
1212 */
1313
14- const { ESLintUtils } = require ( '@typescript-eslint/utils' ) ;
15-
1614module . exports = {
1715 meta : {
1816 type : 'problem' ,
@@ -108,7 +106,7 @@ module.exports = {
108106 }
109107
110108 const returnTypeNode = functionNode . returnType . typeAnnotation ;
111-
109+
112110 // Check if the return type is an inline type
113111 if ( isInlineType ( returnTypeNode ) ) {
114112 const methodName = node . key . type === 'Identifier' ? node . key . name : '<computed>' ;
@@ -138,14 +136,14 @@ module.exports = {
138136 // Check if the property is an arrow function
139137 if ( node . value && node . value . type === 'ArrowFunctionExpression' ) {
140138 const arrowFunction = node . value ;
141-
139+
142140 // Check if the arrow function has a return type annotation
143141 if ( ! arrowFunction . returnType ) {
144142 return ; // No explicit return type, skip
145143 }
146144
147145 const returnTypeNode = arrowFunction . returnType . typeAnnotation ;
148-
146+
149147 // Check if the return type is an inline type
150148 if ( isInlineType ( returnTypeNode ) ) {
151149 const methodName = node . key . type === 'Identifier' ? node . key . name : '<computed>' ;
You can’t perform that action at this time.
0 commit comments