mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Fix pseudo i18n generation script to work with Prettier 3 (#71734)
prettier.format is now a promise -> await it!
This commit is contained in:
parent
a8577c21ba
commit
24bcf9b3fd
@ -13,10 +13,10 @@ function pseudoizeJsonReplacer(key, value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
fs.readFile('./public/locales/en-US/grafana.json').then((enJson) => {
|
||||
fs.readFile('./public/locales/en-US/grafana.json').then(async (enJson) => {
|
||||
const enMessages = JSON.parse(enJson);
|
||||
// Add newline to make prettier happy
|
||||
const pseudoJson = prettier.format(JSON.stringify(enMessages, pseudoizeJsonReplacer, 2), {
|
||||
const pseudoJson = await prettier.format(JSON.stringify(enMessages, pseudoizeJsonReplacer, 2), {
|
||||
parser: 'json',
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user