Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 998ff2c

Browse files
committed
drop un-used empty array ImportDeclaration>specifiers
Signed-off-by: Alexander Bezzubov <[email protected]>
1 parent c645227 commit 998ff2c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

driver/normalizer/normalizer.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,10 @@ var Normalizers = []Mapping{
153153
},
154154
)),
155155
MapSemantic("ImportDeclaration", uast.Import{}, MapObj(
156-
Obj{
157-
"source": Var("path"),
158-
"specifiers": Arr(),
156+
Fields{
157+
{Name: "source", Op: Var("path")},
158+
// empty un-used array
159+
{Name: "specifiers", Drop: true, Op: Arr()},
159160
},
160161
Obj{
161162
"Path": Var("path"),

0 commit comments

Comments
 (0)