Skip to content

Commit aac472e

Browse files
committed
🐛 fix isParenthesized had false positive on ImportExpression (fixes #1)
1 parent ebf5a83 commit aac472e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/is-parenthesized.js

+6
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ function getParentSyntaxParen(node, sourceCode) {
3737
}
3838
return null
3939

40+
case "ImportExpression":
41+
if (parent.source === node) {
42+
return sourceCode.getFirstToken(parent, 1)
43+
}
44+
return null
45+
4046
case "SwitchStatement":
4147
if (parent.discriminant === node) {
4248
return sourceCode.getFirstToken(parent, 1)

0 commit comments

Comments
 (0)