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

Commit c6b0eb7

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

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
@@ -144,9 +144,10 @@ var Normalizers = []Mapping{
144144
},
145145
)),
146146
MapSemantic("ImportDeclaration", uast.Import{}, MapObj(
147-
Obj{
148-
"source": Var("path"),
149-
"specifiers": Arr(),
147+
Fields{
148+
{Name: "source", Op: Var("path")},
149+
// empty un-used array
150+
{Name: "specifiers", Drop: true, Op: Any()},
150151
},
151152
Obj{
152153
"Path": Var("path"),

0 commit comments

Comments
 (0)