Skip to content

Commit

Permalink
πŸ› fix isParenthesized had false positive on ImportExpression (fixes #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed Jul 14, 2019
1 parent ebf5a83 commit aac472e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/is-parenthesized.js
Expand Up @@ -37,6 +37,12 @@ function getParentSyntaxParen(node, sourceCode) {
}
return null

case "ImportExpression":
if (parent.source === node) {
return sourceCode.getFirstToken(parent, 1)
}
return null

case "SwitchStatement":
if (parent.discriminant === node) {
return sourceCode.getFirstToken(parent, 1)
Expand Down

0 comments on commit aac472e

Please sign in to comment.