babel-codemod
Advanced tools
Comparing version 1.9.6 to 1.9.7
{ | ||
"name": "babel-codemod", | ||
"version": "1.9.6", | ||
"version": "1.9.7", | ||
"description": "babel-codemod rewrites JavaScript using babel plugins.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -15,2 +15,5 @@ "use strict"; | ||
let prettier = loadPrettier(); | ||
function resolvePrettierConfig(filepath) { | ||
return Object.assign({}, (prettier.resolveConfig.sync(filepath) || undefined), { filepath }); | ||
} | ||
return { | ||
@@ -20,3 +23,3 @@ parserOverride: RecastPlugin_1.parse, | ||
return { | ||
code: prettier.format(RecastPlugin_1.generate(ast, options, code, _generate).code, prettier.resolveConfig.sync(options.filename) || undefined) | ||
code: prettier.format(RecastPlugin_1.generate(ast, options, code, _generate).code, resolvePrettierConfig(options.filename)) | ||
}; | ||
@@ -23,0 +26,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112593
1603