Skip to content

Commit

Permalink
fix(setup): use .prettierrc if exists (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
heavenshell authored Mar 2, 2020
1 parent d0ec6f3 commit 39b93be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shipjs/src/helper/runPrettier.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export default async function runPrettier({ filePath, dir }) {
const text = fs.readFileSync(filePath).toString();
const options = await prettier.resolveConfig(dir);
const formatted = prettier.format(text, {
parser: getParser(filePath),
...(options || {}),
parser: getParser(filePath),
});
fs.writeFileSync(filePath, formatted);
}
Expand Down

0 comments on commit 39b93be

Please sign in to comment.