File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -24,3 +24,13 @@ export interface Boo { b_oo: null }
24
24
* ESLint should ignore this `no-undef` violation because that rule is turned off for TypeScript.
25
25
*/
26
26
// console.log(undef)
27
+
28
+ /**
29
+ * https://github.com/standard/eslint-config-standard-with-typescript/issues/110
30
+ */
31
+ // Inline callbacks don't need return types:
32
+ setTimeout ( ( ) => { } , 1 )
33
+
34
+ // The return type is clear from the left side of the assignment:
35
+ const double : ( ( n : number ) => number ) = n => n * 2
36
+ ; [ 1 , 2 ] . map ( double )
Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ test('export', (t): void => {
21
21
'@typescript-eslint/array-type' : [ 'error' , 'array-simple' ] ,
22
22
'@typescript-eslint/camelcase' : [ 'error' , { properties : 'never' } ] ,
23
23
'@typescript-eslint/explicit-function-return-type' : [ 'error' , {
24
- allowHigherOrderFunctions : true
24
+ allowExpressions : true ,
25
+ allowHigherOrderFunctions : true ,
26
+ allowTypedFunctionExpressions : true
25
27
} ] ,
26
28
'@typescript-eslint/indent' : [ 'error' , 2 , {
27
29
SwitchCase : 1 ,
Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ export = {
42
42
'@typescript-eslint/adjacent-overload-signatures' : 'error' ,
43
43
'@typescript-eslint/array-type' : [ 'error' , 'array-simple' ] ,
44
44
'@typescript-eslint/explicit-function-return-type' : [ 'error' , {
45
- allowHigherOrderFunctions : true
45
+ allowExpressions : true ,
46
+ allowHigherOrderFunctions : true ,
47
+ allowTypedFunctionExpressions : true
46
48
} ] ,
47
49
'@typescript-eslint/member-delimiter-style' : [
48
50
'error' ,
You can’t perform that action at this time.
0 commit comments