Apply new eslint rules; default to prettier for styling
This commit is contained in:
parent
f22cce8881
commit
dc84af9937
218 changed files with 3876 additions and 3564 deletions
|
@ -3,12 +3,10 @@ import { useDeepCompareMemo } from '@/plugins/useDeepCompareMemo';
|
|||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export default (context: string | string[] | (string | number | null | {})[]) => {
|
||||
const uuid = useStoreState(state => state.user.data?.uuid);
|
||||
const uuid = useStoreState((state) => state.user.data?.uuid);
|
||||
const key = useDeepCompareMemo((): string => {
|
||||
return (Array.isArray(context) ? context : [ context ])
|
||||
.map((value) => JSON.stringify(value))
|
||||
.join(':');
|
||||
}, [ context ]);
|
||||
return (Array.isArray(context) ? context : [context]).map((value) => JSON.stringify(value)).join(':');
|
||||
}, [context]);
|
||||
|
||||
if (!key.trim().length) {
|
||||
throw new Error('Must provide a valid context key to "useUserSWRContextKey".');
|
||||
|
|
Reference in a new issue