Add more eslint rules

This commit is contained in:
Vendicated 2022-10-08 20:36:57 +02:00
parent 0109381a4f
commit dea34503ef
No known key found for this signature in database
GPG key ID: EC781ADFB93EFFA3
13 changed files with 33 additions and 21 deletions

View file

@ -7,7 +7,7 @@ function strEnum<T extends Record<string, string>>(obj: T): T {
for (const key in obj) {
o[key] = obj[key] as any;
o[obj[key]] = key as any;
};
}
return Object.freeze(o);
}

View file

@ -56,7 +56,7 @@ export function useAwaiter<T>(factory: () => Promise<T>, fallbackValue: T | null
}, []);
return [state.value, state.error, state.pending];
};
}
/**
* A lazy component. The factory method is called on first render. For example useful

View file

@ -25,7 +25,7 @@ export function openModal(Component: React.ComponentType, modalProps: Record<str
), { modalKey: key });
return key;
};
}
/**
* Close a modal by key. The id you need for this is returned by openModal.