Update to ESLint 9

This commit is contained in:
Alejandro Celaya
2024-10-12 20:06:48 +02:00
parent 078c5c8889
commit 94890da48f
8 changed files with 1129 additions and 1323 deletions

View File

@@ -20,7 +20,6 @@ export function componentFactory<Deps, CompType = Omit<Partial<Deps>, keyof FC>>
console.error(`[Debug] Could not find "${dep as string}" dependency in container`);
}
// eslint-disable-next-line no-param-reassign
Component[dep] = resolvedDependency;
});

View File

@@ -10,7 +10,7 @@ import './index.scss';
const store = setUpStore(container);
const { App, ScrollToTop, ErrorHandler, appUpdateAvailable } = container;
createRoot(document.getElementById('root')!).render( // eslint-disable-line @typescript-eslint/no-non-null-assertion
createRoot(document.getElementById('root')!).render(
<Provider store={store}>
<BrowserRouter basename={pack.homepage}>
<ErrorHandler>

View File

@@ -67,7 +67,7 @@ const ImportServersBtn: FCWithDeps<ImportServersBtnConnectProps, ImportServersBt
})
.then(() => {
// Reset input after processing file
(target as { value: string | null }).value = null; // eslint-disable-line no-param-reassign
(target as { value: string | null }).value = null;
})
.catch(onImportError),
[create, onImportError, servers, serversImporter, showModal],

View File

@@ -22,7 +22,7 @@ export class ServersExporter {
saveCsv(this.window, csv, SERVERS_FILENAME);
} catch (e) {
// FIXME Handle error
console.error(e); // eslint-disable-line no-console
console.error(e);
}
};
}

View File

@@ -1,6 +1,5 @@
import type { ShlinkState } from '../../container/types';
/* eslint-disable no-param-reassign */
export const migrateDeprecatedSettings = (state: Partial<ShlinkState>): Partial<ShlinkState> => {
if (!state.settings) {
return state;