mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 12:58:06 +01:00
[Glitch] Update typescript-eslint monorepo to v8 (major)
Port a27f7f4e56
to glitch-soc
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renaud Chaput <renchap@gmail.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
196b141af5
commit
17e3a12d3d
13 changed files with 18 additions and 17 deletions
|
@ -65,7 +65,7 @@ export const synchronouslySubmitMarkers = createAppAsyncThunk(
|
|||
client.setRequestHeader('Content-Type', 'application/json');
|
||||
client.setRequestHeader('Authorization', `Bearer ${accessToken}`);
|
||||
client.send(JSON.stringify(params));
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// Do not make the BeforeUnload handler error out
|
||||
}
|
||||
},
|
||||
|
|
|
@ -151,7 +151,7 @@ async function refreshHomeTimelineAndNotification(dispatch, getState) {
|
|||
// TODO: polling for merged notifications
|
||||
try {
|
||||
await dispatch(pollRecentGroupNotifications());
|
||||
} catch (error) {
|
||||
} catch {
|
||||
// TODO
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -5,7 +5,7 @@ export function start() {
|
|||
|
||||
try {
|
||||
Rails.start();
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// If called twice
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,8 +60,8 @@ export default class ErrorBoundary extends PureComponent {
|
|||
try {
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
} catch (e) {
|
||||
|
||||
} catch {
|
||||
// do nothing
|
||||
} finally {
|
||||
document.body.removeChild(textarea);
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ class LoginForm extends React.PureComponent {
|
|||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch(_) {
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ const getRegex = createSelector([
|
|||
|
||||
try {
|
||||
regex = rawRegex && new RegExp(rawRegex.trim(), 'i');
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// Bad regex, don't affect filters
|
||||
}
|
||||
return regex;
|
||||
|
|
|
@ -337,8 +337,8 @@ class UI extends PureComponent {
|
|||
|
||||
try {
|
||||
e.dataTransfer.dropEffect = 'copy';
|
||||
} catch (err) {
|
||||
|
||||
} catch {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -90,7 +90,7 @@ if (initialState) {
|
|||
try {
|
||||
// @ts-expect-error
|
||||
initialState.local_settings = JSON.parse(localStorage.getItem('mastodon-settings'));
|
||||
} catch (e) {
|
||||
} catch {
|
||||
initialState.local_settings = {};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ function onProviderError(error: unknown) {
|
|||
error &&
|
||||
typeof error === 'object' &&
|
||||
error instanceof Error &&
|
||||
error.message.match('MISSING_DATA')
|
||||
/MISSING_DATA/.exec(error.message)
|
||||
) {
|
||||
console.warn(error.message);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ export default class Settings {
|
|||
const encodedData = JSON.stringify(data);
|
||||
localStorage.setItem(key, encodedData);
|
||||
return data;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ export default class Settings {
|
|||
try {
|
||||
const rawData = localStorage.getItem(key);
|
||||
return JSON.parse(rawData);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,8 @@ export default class Settings {
|
|||
const key = this.generateKey(id);
|
||||
try {
|
||||
localStorage.removeItem(key);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// ignore if the key is not found
|
||||
}
|
||||
}
|
||||
return data;
|
||||
|
|
|
@ -30,7 +30,7 @@ function isActionWithmaybeAlertParams(
|
|||
return isAction(action);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types -- we need to use `{}` here to ensure the dispatch types can be merged
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- we need to use `{}` here to ensure the dispatch types can be merged
|
||||
export const errorsMiddleware: Middleware<{}, RootState> =
|
||||
({ dispatch }) =>
|
||||
(next) =>
|
||||
|
|
|
@ -51,7 +51,7 @@ const play = (audio: HTMLAudioElement) => {
|
|||
};
|
||||
|
||||
export const soundsMiddleware = (): Middleware<
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types -- we need to use `{}` here to ensure the dispatch types can be merged
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- we need to use `{}` here to ensure the dispatch types can be merged
|
||||
{},
|
||||
RootState
|
||||
> => {
|
||||
|
|
|
@ -11,7 +11,7 @@ function _autoUnfoldCW(spoiler_text, skip_unfold_regex) {
|
|||
|
||||
try {
|
||||
regex = new RegExp(skip_unfold_regex.trim(), 'i');
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// Bad regex, skip filters
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue