chore: Improve linting within @k8slens/core

- Turning on @typescript-eslint/recommended-requiring-type-checking
- Turning off @typescript-eslint/no-unnecessary-type-assertion (due too many false positives)
- Making @typescript-eslint/no-explicit-any an error (except in tests)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2023-06-01 09:17:17 -04:00
1 parent 6184c2f03b
commit fa44b795d4
734 files changed
+32216 -4566

No files matched your search

@@ -39,6 +39,7 @@ export abstract class IpcMain extends IpcRegistrar {
* @param listener The function that will be called with the arguments of the broadcast
* @returns An optional disposer, Lens will cleanup when the extension is disabled or uninstalled even if this is not called
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
listen(channel: string, listener: (event: Electron.IpcRendererEvent, ...args: any[]) => any): Disposer {
const prefixedChannel = `extensions@${this[IpcPrefix]}:${channel}`;
const cleanup = once(() => {
@@ -59,6 +60,7 @@ export abstract class IpcMain extends IpcRegistrar {
* @param channel The name of the RPC
* @param handler The remote procedure that is called
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
handle(channel: string, handler: (event: Electron.IpcMainInvokeEvent, ...args: any[]) => any): void {
const prefixedChannel = `extensions@${this[IpcPrefix]}:${channel}`;