diff --git a/docs/api/ast-utils.md b/docs/api/ast-utils.md index d433a64..4004355 100644 --- a/docs/api/ast-utils.md +++ b/docs/api/ast-utils.md @@ -363,6 +363,7 @@ The side effect means that it *may* modify a certain variable or object member. - `AssignmentExpression` - `AwaitExpression` - `CallExpression` +- `ImportExpression` - `NewExpression` - `UnaryExpression` (`[operator = "delete"]`) - `UpdateExpression` diff --git a/src/has-side-effect.js b/src/has-side-effect.js index fe0a038..5ae28ee 100644 --- a/src/has-side-effect.js +++ b/src/has-side-effect.js @@ -83,6 +83,9 @@ const visitor = Object.freeze( FunctionExpression() { return false }, + ImportExpression() { + return true + }, MemberExpression(node, options, visitorKeys) { if (options.considerGetters) { return true