diff --git a/lib/.eslintrc.js b/lib/.eslintrc.js index c454440..aa90466 100644 --- a/lib/.eslintrc.js +++ b/lib/.eslintrc.js @@ -12,6 +12,7 @@ module.exports = { "rules": { "prefer-rest-params": 0, + "prefer-spread": 0, "strict": 0, }, diff --git a/lib/compiler/visitor.js b/lib/compiler/visitor.js index d4b97c7..7fae899 100644 --- a/lib/compiler/visitor.js +++ b/lib/compiler/visitor.js @@ -18,7 +18,7 @@ const visitor = { const extraArgs = Array.prototype.slice.call( arguments, 1 ); - visit( ...[ node.expression ].concat( extraArgs ) ); + visit.apply( null, [ node.expression ].concat( extraArgs ) ); } @@ -30,7 +30,7 @@ const visitor = { node[ property ].forEach( child => { - visit( ...[ child ].concat( extraArgs ) ); + visit.apply( null, [ child ].concat( extraArgs ) ); } ); @@ -45,13 +45,13 @@ const visitor = { if ( node.initializer ) { - visit( ...[ node.initializer ].concat( extraArgs ) ); + visit.apply( null, [ node.initializer ].concat( extraArgs ) ); } node.rules.forEach( rule => { - visit( ...[ rule ].concat( extraArgs ) ); + visit.apply( null, [ rule ].concat( extraArgs ) ); } );