feat: add new rule for floating promise (#2726)

Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
Peng Xiao
2023-06-08 17:54:25 +08:00
committed by GitHub
parent fda89b05e7
commit bedf838fe5
45 changed files with 221 additions and 134 deletions

View File

@@ -47,9 +47,9 @@ const getBaseTranslations = async (baseLanguage: { tag: string }) => {
const main = async () => {
try {
fs.access(RES_DIR);
await fs.access(RES_DIR);
} catch (error) {
fs.mkdir(RES_DIR);
fs.mkdir(RES_DIR).catch(console.error);
console.log('Create directory', RES_DIR);
}
console.log('Loading project languages...');
@@ -149,4 +149,7 @@ const main = async () => {
console.log('Done');
};
main();
main().catch(e => {
console.error(e);
process.exit(1);
});