Unexpected empty arrow function
19
20let scale: number;
21const PATCH_SIZE = 32;
22let resolver = () => {}; 23let ready = new Promise<void>(r => {
24 resolver = r;
25});
Description
Having empty functions hurts readability, and is considered a code-smell. There's almost always a way to avoid using them. If you must use one, consider adding a comment to inform the reader of its purpose.
Bad Practice
getUser('SwaGaLisTiQuE', () => {})
Recommended
getUser('SwaGaLisTiQuE', () => {
// empty because <reason>
})