Skip to content

Commit

Permalink
fix: apply prettier programmatically in update script (#1656)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcroote authored and amarthadan committed Apr 10, 2023
1 parent 0a16769 commit be68952
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .changeset/dirty-feet-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
3 changes: 2 additions & 1 deletion scripts/update-config-fixtures.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { readFileSync, writeFileSync } from 'fs';
import fg from 'fast-glob';
import { format } from 'prettier';
import { version as packageVersion } from '../packages/airnode-node/package.json';

const configPatterns = ['./packages/**/*config.example.json', './packages/**/*config.valid.json'];
Expand All @@ -13,7 +14,7 @@ configPatterns.forEach((pattern) => {

// eslint-disable-next-line no-console
console.log(`Updating "${f}" to version ${packageVersion}`);
writeFileSync(f, JSON.stringify(config, null, 2) + '\n');
writeFileSync(f, format(JSON.stringify(config, null, 2), { parser: 'json', printWidth: 120 }));
});
});

Expand Down

0 comments on commit be68952

Please sign in to comment.