1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-23 14:46:40 +09:00

fix code quality issues

This commit is contained in:
まっちゃとーにゅ 2024-01-14 02:46:58 +09:00
parent c5a86174a7
commit 5b0afc9a98
No known key found for this signature in database
GPG Key ID: 6AFBBF529601C1DB
4 changed files with 9 additions and 10 deletions

View File

@ -59,14 +59,14 @@ export default function(props: MfmProps, context: SetupContext<MfmEvents>) {
const validTime = (t: string | null | undefined) => {
if (t == null) return null;
return t.match(/^[0-9.]+s$/) ? t : null;
return RegExp(/^[0-9.]+s$/).exec(t) ? t : null;
};
const validColor = (c: string | null | undefined): string | null => {
if (c == null) return null;
return c.match(/^[0-9a-f]{3,6}$/i) ? c : null;
return RegExp(/^[0-9a-f]{3,6}$/i).exec(c) ? c : null;
};
const useAnim = defaultStore.state.advancedMfm && defaultStore.state.animatedMfm;
/**

View File

@ -1003,10 +1003,10 @@ function attachGameEvents() {
});
}
}
} else {
if (!props.mute) {
// TODO:
}
//} else {
// if (!props.mute) {
// // TODO:
// }
}
});

View File

@ -530,6 +530,7 @@ export class DropAndFusionGame extends EventEmitter<{
case 'yen': return YEN_MONOS;
case 'square': return SQUARE_MONOS;
case 'sweets': return SWEETS_MONOS;
default: throw new Error('unknown game mode');
}
}
@ -743,7 +744,6 @@ export class DropAndFusionGame extends EventEmitter<{
this.gameOver();
break;
}
continue;
}
}
}

View File

@ -26,7 +26,6 @@ function main() {
if (!result.success) {
abort(result.message);
return;
}
}