[Glitch] Upgrade to typescript-eslint
v6
Port a7253075d1
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@ -16,7 +16,7 @@ const defaultTypeSuffixes: Config['promiseTypeSuffixes'] = [
|
||||
export const loadingBarMiddleware = (
|
||||
config: Config = {},
|
||||
): Middleware<Record<string, never>, RootState> => {
|
||||
const promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypeSuffixes;
|
||||
const promiseTypeSuffixes = config.promiseTypeSuffixes ?? defaultTypeSuffixes;
|
||||
|
||||
return ({ dispatch }) =>
|
||||
(next) =>
|
||||
@ -32,7 +32,7 @@ export const loadingBarMiddleware = (
|
||||
if (action.type.match(isPending)) {
|
||||
dispatch(showLoading());
|
||||
} else if (
|
||||
action.type.match(isFulfilled) ||
|
||||
action.type.match(isFulfilled) ??
|
||||
action.type.match(isRejected)
|
||||
) {
|
||||
dispatch(hideLoading());
|
||||
|
@ -38,7 +38,7 @@ export const soundsMiddleware = (): Middleware<
|
||||
Record<string, never>,
|
||||
RootState
|
||||
> => {
|
||||
const soundCache: { [key: string]: HTMLAudioElement } = {};
|
||||
const soundCache: Record<string, HTMLAudioElement> = {};
|
||||
|
||||
void ready(() => {
|
||||
soundCache.boop = createAudio([
|
||||
@ -56,9 +56,9 @@ export const soundsMiddleware = (): Middleware<
|
||||
return () =>
|
||||
(next) =>
|
||||
(action: AnyAction & { meta?: { sound?: string } }) => {
|
||||
const sound = action?.meta?.sound;
|
||||
const sound = action.meta?.sound;
|
||||
|
||||
if (sound && soundCache[sound]) {
|
||||
if (sound && Object.hasOwn(soundCache, sound)) {
|
||||
play(soundCache[sound]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user