[Glitch] Update eslint (non-major)

Port 37d984b8bf 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>
main-rebase-security-fix
renovate[bot] 2024-04-03 20:05:39 +02:00 committed by Claire
parent e76ddf79bc
commit ac5113d524
4 changed files with 8 additions and 7 deletions

View File

@ -24,7 +24,7 @@ export type StatusLike = Record<{
function normalizeHashtag(hashtag: string) {
return (
hashtag && hashtag.startsWith('#') ? hashtag.slice(1) : hashtag
!!hashtag && hashtag.startsWith('#') ? hashtag.slice(1) : hashtag
).normalize('NFKC');
}

View File

@ -363,6 +363,6 @@ ready(() => {
document.querySelectorAll('[data-admin-component]').forEach((element) => {
void mountReactComponent(element);
});
}).catch((reason) => {
}).catch((reason: unknown) => {
throw reason;
});

View File

@ -69,7 +69,7 @@ window.addEventListener('message', (e) => {
},
'*',
);
}).catch((e) => {
}).catch((e: unknown) => {
console.error('Error in setHeightMessage postMessage', e);
});
});
@ -206,7 +206,7 @@ function loaded() {
return true;
})
.catch((error) => {
.catch((error: unknown) => {
console.error(error);
});
}
@ -448,7 +448,7 @@ Rails.delegate(document, '#registration_new_user,#new_user', 'submit', () => {
});
function main() {
ready(loaded).catch((error) => {
ready(loaded).catch((error: unknown) => {
console.error(error);
});
}
@ -457,6 +457,6 @@ loadPolyfills()
.then(loadLocale)
.then(main)
.then(loadKeyboardExtensions)
.catch((error) => {
.catch((error: unknown) => {
console.error(error);
});

View File

@ -4,5 +4,6 @@ export function uuid(a?: string): string {
(a as unknown as number) ^
((Math.random() * 16) >> ((a as unknown as number) / 4))
).toString(16)
: ('' + 1e7 + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, uuid);
: // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
('' + 1e7 + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, uuid);
}