Skip to content

Commit

Permalink
resolve prettier configuration before formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMSchmidt committed May 8, 2018
1 parent ee00435 commit ce97aba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions generation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const allFiles = [...Object.values(iosFiles), ...Object.values(androidFiles)];

allFiles.forEach((file) => {
const text = fs.readFileSync(file, 'utf8');
const formatted = prettier.format(text);
fs.writeFileSync(file, formatted);
prettier.resolveConfig(file).then((options) => {
const formatted = prettier.format(text, options);
fs.writeFileSync(file, formatted);
});
});

0 comments on commit ce97aba

Please sign in to comment.