Skip to content

Commit d36ff81

Browse files
author
Tim Chon
committed
add template literal test and fix syntax error
1 parent 170b091 commit d36ff81

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/__tests__/fixtures/component_2.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ export function foo() {
2929
export function chained() {
3030
return foo.bar().join();
3131
}
32+
33+
export function templateLiteral() {
34+
return `foo bar`.split(' ');
35+
}

src/utils/isStatelessComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function isValidCalleeType(type) {
3232
'Identifier',
3333
'CallExpression',
3434
'ArrayExpression',
35-
'TemplateLiteral'
35+
'TemplateLiteral',
3636
'Literal'
3737
].indexOf(type) < 0;
3838
}

0 commit comments

Comments
 (0)