[Glitch] Update typescript-eslint monorepo to v8 (major)

Port a27f7f4e561c9d2fe21d984059603d2f500c005b 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:
renovate[bot] 2024-09-11 15:59:46 +02:00 committed by Claire
parent 196b141af5
commit 17e3a12d3d
13 changed files with 18 additions and 17 deletions

View File

@ -65,7 +65,7 @@ export const synchronouslySubmitMarkers = createAppAsyncThunk(
client.setRequestHeader('Content-Type', 'application/json'); client.setRequestHeader('Content-Type', 'application/json');
client.setRequestHeader('Authorization', `Bearer ${accessToken}`); client.setRequestHeader('Authorization', `Bearer ${accessToken}`);
client.send(JSON.stringify(params)); client.send(JSON.stringify(params));
} catch (e) { } catch {
// Do not make the BeforeUnload handler error out // Do not make the BeforeUnload handler error out
} }
}, },

View File

@ -151,7 +151,7 @@ async function refreshHomeTimelineAndNotification(dispatch, getState) {
// TODO: polling for merged notifications // TODO: polling for merged notifications
try { try {
await dispatch(pollRecentGroupNotifications()); await dispatch(pollRecentGroupNotifications());
} catch (error) { } catch {
// TODO // TODO
} }
} else { } else {

View File

@ -5,7 +5,7 @@ export function start() {
try { try {
Rails.start(); Rails.start();
} catch (e) { } catch {
// If called twice // If called twice
} }
} }

View File

@ -60,8 +60,8 @@ export default class ErrorBoundary extends PureComponent {
try { try {
textarea.select(); textarea.select();
document.execCommand('copy'); document.execCommand('copy');
} catch (e) { } catch {
// do nothing
} finally { } finally {
document.body.removeChild(textarea); document.body.removeChild(textarea);
} }

View File

@ -131,7 +131,7 @@ class LoginForm extends React.PureComponent {
try { try {
new URL(url); new URL(url);
return true; return true;
} catch(_) { } catch {
return false; return false;
} }
}; };

View File

@ -15,7 +15,7 @@ const getRegex = createSelector([
try { try {
regex = rawRegex && new RegExp(rawRegex.trim(), 'i'); regex = rawRegex && new RegExp(rawRegex.trim(), 'i');
} catch (e) { } catch {
// Bad regex, don't affect filters // Bad regex, don't affect filters
} }
return regex; return regex;

View File

@ -337,8 +337,8 @@ class UI extends PureComponent {
try { try {
e.dataTransfer.dropEffect = 'copy'; e.dataTransfer.dropEffect = 'copy';
} catch (err) { } catch {
// do nothing
} }
return false; return false;

View File

@ -90,7 +90,7 @@ if (initialState) {
try { try {
// @ts-expect-error // @ts-expect-error
initialState.local_settings = JSON.parse(localStorage.getItem('mastodon-settings')); initialState.local_settings = JSON.parse(localStorage.getItem('mastodon-settings'));
} catch (e) { } catch {
initialState.local_settings = {}; initialState.local_settings = {};
} }
} }

View File

@ -17,7 +17,7 @@ function onProviderError(error: unknown) {
error && error &&
typeof error === 'object' && typeof error === 'object' &&
error instanceof Error && error instanceof Error &&
error.message.match('MISSING_DATA') /MISSING_DATA/.exec(error.message)
) { ) {
console.warn(error.message); console.warn(error.message);
} }

View File

@ -14,7 +14,7 @@ export default class Settings {
const encodedData = JSON.stringify(data); const encodedData = JSON.stringify(data);
localStorage.setItem(key, encodedData); localStorage.setItem(key, encodedData);
return data; return data;
} catch (e) { } catch {
return null; return null;
} }
} }
@ -24,7 +24,7 @@ export default class Settings {
try { try {
const rawData = localStorage.getItem(key); const rawData = localStorage.getItem(key);
return JSON.parse(rawData); return JSON.parse(rawData);
} catch (e) { } catch {
return null; return null;
} }
} }
@ -35,7 +35,8 @@ export default class Settings {
const key = this.generateKey(id); const key = this.generateKey(id);
try { try {
localStorage.removeItem(key); localStorage.removeItem(key);
} catch (e) { } catch {
// ignore if the key is not found
} }
} }
return data; return data;

View File

@ -30,7 +30,7 @@ function isActionWithmaybeAlertParams(
return isAction(action); 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> = export const errorsMiddleware: Middleware<{}, RootState> =
({ dispatch }) => ({ dispatch }) =>
(next) => (next) =>

View File

@ -51,7 +51,7 @@ const play = (audio: HTMLAudioElement) => {
}; };
export const soundsMiddleware = (): Middleware< 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 RootState
> => { > => {

View File

@ -11,7 +11,7 @@ function _autoUnfoldCW(spoiler_text, skip_unfold_regex) {
try { try {
regex = new RegExp(skip_unfold_regex.trim(), 'i'); regex = new RegExp(skip_unfold_regex.trim(), 'i');
} catch (e) { } catch {
// Bad regex, skip filters // Bad regex, skip filters
return true; return true;
} }