File tree Expand file tree Collapse file tree 3 files changed +37
-1
lines changed Expand file tree Collapse file tree 3 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -8053,6 +8053,10 @@ const hello = name => {
8053
8053
};
8054
8054
// Options: [{"require":{"ArrowFunctionExpression":true,"FunctionDeclaration":false}}]
8055
8055
// Message: Missing JSDoc comment.
8056
+
8057
+ export const loginSuccessAction = (): BaseActionPayload => ({ type: LOGIN_SUCCESSFUL });
8058
+ // Options: [{"require":{"ArrowFunctionExpression":true,"FunctionDeclaration":false}}]
8059
+ // Message: Missing JSDoc comment.
8056
8060
````
8057
8061
8058
8062
The following patterns are not considered problems:
Original file line number Diff line number Diff line change @@ -154,7 +154,11 @@ const getReducedASTNode = function (node, sourceCode) {
154
154
}
155
155
}
156
156
157
- if ( parent && parent . type !== 'FunctionDeclaration' && parent . type !== 'Program' ) {
157
+ if ( parent ) {
158
+ if ( parent . parent . type === 'ExportNamedDeclaration' ) {
159
+ return parent . parent ;
160
+ }
161
+
158
162
return parent ;
159
163
}
160
164
}
Original file line number Diff line number Diff line change @@ -1384,6 +1384,34 @@ export default {
1384
1384
};
1385
1385
` ,
1386
1386
} ,
1387
+ {
1388
+ code : `
1389
+ export const loginSuccessAction = (): BaseActionPayload => ({ type: LOGIN_SUCCESSFUL });
1390
+ ` ,
1391
+ errors : [
1392
+ {
1393
+ message : 'Missing JSDoc comment.' ,
1394
+ } ,
1395
+ ] ,
1396
+ options : [
1397
+ {
1398
+ require : {
1399
+ ArrowFunctionExpression : true ,
1400
+ FunctionDeclaration : false ,
1401
+ } ,
1402
+ } ,
1403
+ ] ,
1404
+ output : `
1405
+ /**
1406
+ *
1407
+ */
1408
+ export const loginSuccessAction = (): BaseActionPayload => ({ type: LOGIN_SUCCESSFUL });
1409
+ ` ,
1410
+ parser : require . resolve ( '@typescript-eslint/parser' ) ,
1411
+ parserOptions : {
1412
+ sourceType : 'module' ,
1413
+ } ,
1414
+ } ,
1387
1415
] ,
1388
1416
valid : [ {
1389
1417
code : `
You can’t perform that action at this time.
0 commit comments