From 247bcd338a71551be68c727674575766da0f4289 Mon Sep 17 00:00:00 2001 From: John Obelenus Date: Fri, 16 Jan 2026 14:27:02 -0500 Subject: [PATCH] Proposal: Changing some linting rules, making some fixes --- app/web/eslint.config.ts | 17 +++++++++++------ .../src/components/CachedAppNotification.vue | 2 +- app/web/src/newhotness/FuncRunDetails.vue | 6 +++--- app/web/src/newhotness/LatestFuncRunDetails.vue | 2 +- app/web/src/newhotness/Review.vue | 2 +- app/web/src/newhotness/StatusPanel.vue | 8 ++++---- app/web/src/newhotness/Workspace.vue | 4 ++-- .../newhotness/api_composables/func_run.test.ts | 1 - .../logic_composables/rainbow_counter.ts | 2 +- .../logic_composables/watched_form.ts | 2 +- app/web/src/newhotness/nav/Collaborators.vue | 2 +- app/web/src/newhotness/nav/Notifications.vue | 2 +- app/web/src/store/auth.store.ts | 2 +- app/web/src/store/realtime/heimdall.ts | 10 +++------- app/web/src/store/realtime/realtime.store.ts | 2 +- app/web/src/workers/types/dbinterface.ts | 2 +- app/web/src/workers/webworker.mess.ts | 2 +- app/web/src/workers/webworker.perf.ts | 2 +- app/web/src/workers/webworker.test.ts | 3 +-- app/web/src/workers/webworker.ts | 4 ++-- 20 files changed, 38 insertions(+), 39 deletions(-) diff --git a/app/web/eslint.config.ts b/app/web/eslint.config.ts index 1a2257b2bf..d591c38afa 100644 --- a/app/web/eslint.config.ts +++ b/app/web/eslint.config.ts @@ -74,9 +74,7 @@ export default defineConfigWithVueTs( // dont want this "@typescript-eslint/consistent-type-imports": 0, "import/named": 0, - - // warning on this because we have some shenanigans where it is a promise but a literal `await` is not present - "@typescript-eslint/require-await": "warn", + "@typescript-eslint/require-await": 0, // "prettier/prettier": "warn", "@typescript-eslint/quotes": 0, @@ -103,10 +101,11 @@ export default defineConfigWithVueTs( "no-await-in-loop": 0, "no-lonely-if": 0, "@typescript-eslint/no-unused-vars": [ - "warn", + "error", { argsIgnorePattern: "^_|^(response)$", varsIgnorePattern: "^_|^(props|emit)$", + caughtErrorsIgnorePattern: "^_", }, ], "@typescript-eslint/return-await": 0, @@ -116,7 +115,7 @@ export default defineConfigWithVueTs( // curly: ["error", "multi-line"], // "brace-style": "error", "max-len": [ - "warn", // just a warning since prettier will enforce + "off", // prettier will enforce 120, 2, { @@ -167,9 +166,9 @@ export default defineConfigWithVueTs( "@typescript-eslint/no-shadow": 0, "guard-for-in": 0, + "no-console": "error", // some rules to downgrade to warning while developing -------------------- // useful so things dont crash when code is temporarily commented out - "no-console": "warn", "@typescript-eslint/no-empty-function": "warn", "no-debugger": "warn", "no-alert": "warn", @@ -192,6 +191,12 @@ export default defineConfigWithVueTs( // useful while debugging and commenting things out, otherwise gets automatically changed from let to const // "no-autofix/prefer-const": "warn", + // not clear to me why we have these problems + "import/no-named-as-default": 0, + "import/no-named-as-default-member": 0, + + "@typescript-eslint/no-empty-function": 0, + "vue/block-order": [ "error", { diff --git a/app/web/src/components/CachedAppNotification.vue b/app/web/src/components/CachedAppNotification.vue index f49d9fbec3..86dae08f82 100644 --- a/app/web/src/components/CachedAppNotification.vue +++ b/app/web/src/components/CachedAppNotification.vue @@ -54,7 +54,7 @@ async function check() { if (runningHash && latestHash !== runningHash) { openModal(); } - } catch (err) { + } catch (_err) { // local dev errors here because the manifest file doesn't exist stopInterval(); } diff --git a/app/web/src/newhotness/FuncRunDetails.vue b/app/web/src/newhotness/FuncRunDetails.vue index 0b19ca0df1..dd34cfe67b 100644 --- a/app/web/src/newhotness/FuncRunDetails.vue +++ b/app/web/src/newhotness/FuncRunDetails.vue @@ -289,7 +289,7 @@ const functionCode = computed(() => { try { const decodedCode = atob(funcRun.value.functionCodeBase64); return decodedCode; - } catch (e) { + } catch (_e) { return "// Error decoding function code"; } }); @@ -300,7 +300,7 @@ const argsJson = computed(() => { try { return JSON.stringify(funcRun.value.functionArgs, null, 2); - } catch (e) { + } catch (_e) { return "// Error formatting arguments"; } }); @@ -311,7 +311,7 @@ const resultJson = computed(() => { try { return JSON.stringify(funcRun.value.resultValue, null, 2); - } catch (e) { + } catch (_e) { return "// Error formatting result"; } }); diff --git a/app/web/src/newhotness/LatestFuncRunDetails.vue b/app/web/src/newhotness/LatestFuncRunDetails.vue index 1de9b1969a..8c7b490864 100644 --- a/app/web/src/newhotness/LatestFuncRunDetails.vue +++ b/app/web/src/newhotness/LatestFuncRunDetails.vue @@ -104,7 +104,7 @@ const functionCode = computed(() => actionDetailQuery.data.value?.code); const argsJson = computed(() => { try { return JSON.stringify(actionDetailQuery.data.value?.args, null, 2); - } catch (e) { + } catch (_e) { return "// Error formatting arguments"; } }); diff --git a/app/web/src/newhotness/Review.vue b/app/web/src/newhotness/Review.vue index ff97f69eb7..2740cab660 100644 --- a/app/web/src/newhotness/Review.vue +++ b/app/web/src/newhotness/Review.vue @@ -971,7 +971,7 @@ const restoreComponent = async () => { await sleep(1000); const result = await restoreComponents([selectedComponent.value.id]); restoreComponentStatus.value = result.success ? "succeeded" : undefined; - } catch (e) { + } catch (_e) { restoreComponentStatus.value = undefined; } }; diff --git a/app/web/src/newhotness/StatusPanel.vue b/app/web/src/newhotness/StatusPanel.vue index 3b4eb91732..c817aeb647 100644 --- a/app/web/src/newhotness/StatusPanel.vue +++ b/app/web/src/newhotness/StatusPanel.vue @@ -88,7 +88,7 @@ const STATUS_PANEL_KEY = "statusPanel"; realtimeStore.subscribe(STATUS_PANEL_KEY, `workspace/${ctx.workspacePk.value}`, [ { eventType: "ChangeSetStatusChanged", - callback: async (data) => { + callback: (data) => { if ( [ChangeSetStatus.Abandoned, ChangeSetStatus.Applied, ChangeSetStatus.Closed].includes(data.changeSet.status) && data.changeSet.id !== ctx.headChangeSetId.value @@ -102,7 +102,7 @@ realtimeStore.subscribe(STATUS_PANEL_KEY, `workspace/${ctx.workspacePk.value}`, }, { eventType: "ManagementOperationsComplete", - callback: async (payload, meta) => { + callback: (payload, meta) => { if (!payload.requestUlid) return; const key = `management-${payload.requestUlid}`; if (superBucket[meta.change_set_id]?.[key]) { @@ -113,7 +113,7 @@ realtimeStore.subscribe(STATUS_PANEL_KEY, `workspace/${ctx.workspacePk.value}`, }, { eventType: "ManagementOperationsFailed", - callback: async (payload, meta) => { + callback: (payload, meta) => { // BUCKET ITEM -- ADD -- MANAGEMENT FUNCS const key = `management-${payload.requestUlid}`; let bucket = superBucket[meta.change_set_id]; @@ -126,7 +126,7 @@ realtimeStore.subscribe(STATUS_PANEL_KEY, `workspace/${ctx.workspacePk.value}`, }, { eventType: "ManagementOperationsInProgress", - callback: async (payload, meta) => { + callback: (payload, meta) => { // BUCKET ITEM -- ADD -- MANAGEMENT FUNCS const key = `management-${payload.requestUlid}`; let bucket = superBucket[meta.change_set_id]; diff --git a/app/web/src/newhotness/Workspace.vue b/app/web/src/newhotness/Workspace.vue index d282116aba..d024f7d8c3 100644 --- a/app/web/src/newhotness/Workspace.vue +++ b/app/web/src/newhotness/Workspace.vue @@ -146,7 +146,7 @@