From b1f7c381b0dfc627fc19b408805e62b61243ac57 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 1 Aug 2019 16:59:03 +0300 Subject: [PATCH] chore(putout) run-babel-plugins: rm source --- packages/putout/lib/putout.js | 1 - packages/putout/lib/run-babel-plugins/index.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/putout/lib/putout.js b/packages/putout/lib/putout.js index f5f7fa8b0b..7c2965b6f9 100644 --- a/packages/putout/lib/putout.js +++ b/packages/putout/lib/putout.js @@ -116,7 +116,6 @@ function transform(ast, source, opts) { ...runBabelPlugins({ ast, fix, - source, babelPlugins, }), ...runPlugins({ diff --git a/packages/putout/lib/run-babel-plugins/index.js b/packages/putout/lib/run-babel-plugins/index.js index e996f48d0a..31a1c0113f 100644 --- a/packages/putout/lib/run-babel-plugins/index.js +++ b/packages/putout/lib/run-babel-plugins/index.js @@ -9,7 +9,7 @@ const getMessage = (a) => a .replace(/@babel\/plugin-|babel-plugin-/, '') .replace(/-/g, ' '); -module.exports = ({fix, ast, source, babelPlugins}) => { +module.exports = ({fix, ast, babelPlugins}) => { const places = []; if (!babelPlugins) @@ -18,7 +18,7 @@ module.exports = ({fix, ast, source, babelPlugins}) => { const oldCode = print(ast); for (const plugin of babelPlugins) { - transform(ast, source, plugin); + transform(ast, '', plugin); // that's right, transform changes AST const newCode = print(ast);