File tree Expand file tree Collapse file tree 3 files changed +10
-24
lines changed
typescript-estree/tests/lib Expand file tree Collapse file tree 3 files changed +10
-24
lines changed Original file line number Diff line number Diff line change @@ -361,7 +361,9 @@ class Referencer extends OriginalReferencer {
361
361
* Create reference objects for the references in parameters and return type.
362
362
* @param node The TSEmptyBodyFunctionExpression node to visit.
363
363
*/
364
- TSEmptyBodyFunctionExpression ( node : TSESTree . FunctionExpression ) : void {
364
+ TSEmptyBodyFunctionExpression (
365
+ node : TSESTree . TSEmptyBodyFunctionExpression
366
+ ) : void {
365
367
const upperTypeMode = this . typeMode ;
366
368
const { typeParameters, params, returnType } = node ;
367
369
Original file line number Diff line number Diff line change @@ -33,12 +33,12 @@ describe('parser', () => {
33
33
it ( 'parseAndGenerateServices() should be called with options' , ( ) => {
34
34
const code = 'const valid = true;' ;
35
35
const spy = jest . spyOn ( typescriptESTree , 'parseAndGenerateServices' ) ;
36
- parseForESLint ( code , {
36
+ const config = {
37
37
loc : false ,
38
38
comment : false ,
39
39
range : false ,
40
40
tokens : false ,
41
- sourceType : 'module' ,
41
+ sourceType : 'module' as 'module' ,
42
42
ecmaVersion : 10 ,
43
43
ecmaFeatures : {
44
44
globalReturn : false ,
@@ -50,29 +50,13 @@ describe('parser', () => {
50
50
useJSXTextNode : false ,
51
51
errorOnUnknownASTType : false ,
52
52
errorOnTypeScriptSyntacticAndSemanticIssues : false ,
53
- tsconfigRootDir : '../.. /' ,
53
+ tsconfigRootDir : './' ,
54
54
extraFileExtensions : [ 'foo' ]
55
- } ) ;
55
+ } ;
56
+ parseForESLint ( code , config ) ;
56
57
expect ( spy ) . toHaveBeenCalledWith ( code , {
57
58
jsx : false ,
58
- loc : false ,
59
- comment : false ,
60
- range : false ,
61
- tokens : false ,
62
- sourceType : 'module' ,
63
- ecmaVersion : 10 ,
64
- ecmaFeatures : {
65
- globalReturn : false ,
66
- jsx : false
67
- } ,
68
- // ts-estree specific
69
- filePath : 'test/foo' ,
70
- project : 'tsconfig.json' ,
71
- useJSXTextNode : false ,
72
- errorOnUnknownASTType : false ,
73
- errorOnTypeScriptSyntacticAndSemanticIssues : false ,
74
- tsconfigRootDir : '../../' ,
75
- extraFileExtensions : [ 'foo' ]
59
+ ...config
76
60
} ) ;
77
61
} ) ;
78
62
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {
17
17
VariableDeclaration ,
18
18
ClassDeclaration ,
19
19
ClassProperty
20
- } from '../../src/typedefs ' ;
20
+ } from '../../src/ts-estree ' ;
21
21
22
22
//------------------------------------------------------------------------------
23
23
// Setup
You can’t perform that action at this time.
0 commit comments