We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 786f62b commit a38982cCopy full SHA for a38982c
scripts/update-operators.ts
@@ -1,5 +1,6 @@
1
import { writeFile } from 'node:fs/promises'
2
import process from 'process'
3
+import * as prettier from 'prettier'
4
5
import { getOperators } from './shared'
6
@@ -12,8 +13,14 @@ async function main() {
12
13
PROFESSIONS: professions,
14
})
15
16
+ const prettierConfig = await prettier.resolveConfig(process.cwd())
17
+ const formatted = prettier.format(content, {
18
+ ...prettierConfig,
19
+ parser: 'json',
20
+ })
21
+
22
console.info('Writing to operators.json...')
- await writeFile('src/models/generated/operators.json', content)
23
+ await writeFile('src/models/generated/operators.json', formatted)
24
}
25
26
main()
0 commit comments