mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-22 20:41:50 +08:00
style: add no-misused-promises rule (#3547)
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
This commit is contained in:
@@ -87,23 +87,22 @@ const main = async () => {
|
||||
language => language.completeRate > 0.4
|
||||
);
|
||||
|
||||
availableLanguages
|
||||
for (const language of availableLanguages
|
||||
// skip base language
|
||||
.filter(i => !i.base)
|
||||
.forEach(async language => {
|
||||
await fs.writeFile(
|
||||
path.resolve(RES_DIR, `${language.tag}.json`),
|
||||
JSON.stringify(
|
||||
{
|
||||
'// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.':
|
||||
'',
|
||||
...flattenTranslation(language.translations),
|
||||
},
|
||||
null,
|
||||
INDENT
|
||||
) + '\n'
|
||||
);
|
||||
});
|
||||
.filter(i => !i.base)) {
|
||||
await fs.writeFile(
|
||||
path.resolve(RES_DIR, `${language.tag}.json`),
|
||||
JSON.stringify(
|
||||
{
|
||||
'// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.':
|
||||
'',
|
||||
...flattenTranslation(language.translations),
|
||||
},
|
||||
null,
|
||||
INDENT
|
||||
) + '\n'
|
||||
);
|
||||
}
|
||||
|
||||
console.log('Generating meta data...');
|
||||
const code = `// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
|
||||
Reference in New Issue
Block a user