Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Commit 5c86e59

Browse files
authored
Merge pull request #8295 from systeminit/jobelenus/linting-rules
Proposal: Changing some linting rules, making some fixes
2 parents 64151b9 + 247bcd3 commit 5c86e59

20 files changed

Lines changed: 38 additions & 39 deletions

app/web/eslint.config.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ export default defineConfigWithVueTs(
7474
// dont want this
7575
"@typescript-eslint/consistent-type-imports": 0,
7676
"import/named": 0,
77-
78-
// warning on this because we have some shenanigans where it is a promise but a literal `await` is not present
79-
"@typescript-eslint/require-await": "warn",
77+
"@typescript-eslint/require-await": 0,
8078

8179
// "prettier/prettier": "warn",
8280
"@typescript-eslint/quotes": 0,
@@ -103,10 +101,11 @@ export default defineConfigWithVueTs(
103101
"no-await-in-loop": 0,
104102
"no-lonely-if": 0,
105103
"@typescript-eslint/no-unused-vars": [
106-
"warn",
104+
"error",
107105
{
108106
argsIgnorePattern: "^_|^(response)$",
109107
varsIgnorePattern: "^_|^(props|emit)$",
108+
caughtErrorsIgnorePattern: "^_",
110109
},
111110
],
112111
"@typescript-eslint/return-await": 0,
@@ -116,7 +115,7 @@ export default defineConfigWithVueTs(
116115
// curly: ["error", "multi-line"],
117116
// "brace-style": "error",
118117
"max-len": [
119-
"warn", // just a warning since prettier will enforce
118+
"off", // prettier will enforce
120119
120,
121120
2,
122121
{
@@ -167,9 +166,9 @@ export default defineConfigWithVueTs(
167166
"@typescript-eslint/no-shadow": 0,
168167
"guard-for-in": 0,
169168

169+
"no-console": "error",
170170
// some rules to downgrade to warning while developing --------------------
171171
// useful so things dont crash when code is temporarily commented out
172-
"no-console": "warn",
173172
"@typescript-eslint/no-empty-function": "warn",
174173
"no-debugger": "warn",
175174
"no-alert": "warn",
@@ -192,6 +191,12 @@ export default defineConfigWithVueTs(
192191
// useful while debugging and commenting things out, otherwise gets automatically changed from let to const
193192
// "no-autofix/prefer-const": "warn",
194193

194+
// not clear to me why we have these problems
195+
"import/no-named-as-default": 0,
196+
"import/no-named-as-default-member": 0,
197+
198+
"@typescript-eslint/no-empty-function": 0,
199+
195200
"vue/block-order": [
196201
"error",
197202
{

app/web/src/components/CachedAppNotification.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async function check() {
5454
if (runningHash && latestHash !== runningHash) {
5555
openModal();
5656
}
57-
} catch (err) {
57+
} catch (_err) {
5858
// local dev errors here because the manifest file doesn't exist
5959
stopInterval();
6060
}

app/web/src/newhotness/FuncRunDetails.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ const functionCode = computed<string>(() => {
289289
try {
290290
const decodedCode = atob(funcRun.value.functionCodeBase64);
291291
return decodedCode;
292-
} catch (e) {
292+
} catch (_e) {
293293
return "// Error decoding function code";
294294
}
295295
});
@@ -300,7 +300,7 @@ const argsJson = computed<string>(() => {
300300
301301
try {
302302
return JSON.stringify(funcRun.value.functionArgs, null, 2);
303-
} catch (e) {
303+
} catch (_e) {
304304
return "// Error formatting arguments";
305305
}
306306
});
@@ -311,7 +311,7 @@ const resultJson = computed<string>(() => {
311311
312312
try {
313313
return JSON.stringify(funcRun.value.resultValue, null, 2);
314-
} catch (e) {
314+
} catch (_e) {
315315
return "// Error formatting result";
316316
}
317317
});

app/web/src/newhotness/LatestFuncRunDetails.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const functionCode = computed(() => actionDetailQuery.data.value?.code);
104104
const argsJson = computed(() => {
105105
try {
106106
return JSON.stringify(actionDetailQuery.data.value?.args, null, 2);
107-
} catch (e) {
107+
} catch (_e) {
108108
return "// Error formatting arguments";
109109
}
110110
});

app/web/src/newhotness/Review.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ const restoreComponent = async () => {
971971
await sleep(1000);
972972
const result = await restoreComponents([selectedComponent.value.id]);
973973
restoreComponentStatus.value = result.success ? "succeeded" : undefined;
974-
} catch (e) {
974+
} catch (_e) {
975975
restoreComponentStatus.value = undefined;
976976
}
977977
};

app/web/src/newhotness/StatusPanel.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const STATUS_PANEL_KEY = "statusPanel";
8888
realtimeStore.subscribe(STATUS_PANEL_KEY, `workspace/${ctx.workspacePk.value}`, [
8989
{
9090
eventType: "ChangeSetStatusChanged",
91-
callback: async (data) => {
91+
callback: (data) => {
9292
if (
9393
[ChangeSetStatus.Abandoned, ChangeSetStatus.Applied, ChangeSetStatus.Closed].includes(data.changeSet.status) &&
9494
data.changeSet.id !== ctx.headChangeSetId.value
@@ -102,7 +102,7 @@ realtimeStore.subscribe(STATUS_PANEL_KEY, `workspace/${ctx.workspacePk.value}`,
102102
},
103103
{
104104
eventType: "ManagementOperationsComplete",
105-
callback: async (payload, meta) => {
105+
callback: (payload, meta) => {
106106
if (!payload.requestUlid) return;
107107
const key = `management-${payload.requestUlid}`;
108108
if (superBucket[meta.change_set_id]?.[key]) {
@@ -113,7 +113,7 @@ realtimeStore.subscribe(STATUS_PANEL_KEY, `workspace/${ctx.workspacePk.value}`,
113113
},
114114
{
115115
eventType: "ManagementOperationsFailed",
116-
callback: async (payload, meta) => {
116+
callback: (payload, meta) => {
117117
// BUCKET ITEM -- ADD -- MANAGEMENT FUNCS
118118
const key = `management-${payload.requestUlid}`;
119119
let bucket = superBucket[meta.change_set_id];
@@ -126,7 +126,7 @@ realtimeStore.subscribe(STATUS_PANEL_KEY, `workspace/${ctx.workspacePk.value}`,
126126
},
127127
{
128128
eventType: "ManagementOperationsInProgress",
129-
callback: async (payload, meta) => {
129+
callback: (payload, meta) => {
130130
// BUCKET ITEM -- ADD -- MANAGEMENT FUNCS
131131
const key = `management-${payload.requestUlid}`;
132132
let bucket = superBucket[meta.change_set_id];

app/web/src/newhotness/Workspace.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
<script lang="ts" setup>
147147
import { useRoute, useRouter } from "vue-router";
148148
import clsx from "clsx";
149-
import { computed, onMounted, onBeforeUnmount, onBeforeMount, ref, provide, watch, Ref, inject } from "vue";
149+
import { computed, onMounted, onBeforeMount, ref, provide, watch, Ref, inject } from "vue";
150150
import * as _ from "lodash-es";
151151
import { useQuery, useQueryClient } from "@tanstack/vue-query";
152152
import { Span, trace } from "@opentelemetry/api";
@@ -173,7 +173,7 @@ import {
173173
startMouseEmitters,
174174
startKeyEmitter,
175175
startWindowResizeEmitter,
176-
windowWidthReactive
176+
windowWidthReactive,
177177
} from "./logic_composables/emitters";
178178
import { getUserPkFromToken, tokensByWorkspacePk } from "./logic_composables/tokens";
179179
import ComponentPage from "./ComponentDetails.vue";

app/web/src/newhotness/api_composables/func_run.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { describe, expect, test } from "vitest";
22
import { funcRunStatus, FuncRun, FuncKind, FuncBackendKind, FuncBackendResponseType } from "./func_run";
3-
import { ManagementState } from "./management_func_job_state";
43

54
/**
65
* Creates a minimal FuncRun object for testing.

app/web/src/newhotness/logic_composables/rainbow_counter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const useRainbow = (changeSetId: ComputedRef<ChangeSetId>) => {
2626
* When its > 0 the system is waiting for data
2727
*/
2828
return { count: computed(() => queue?.size ?? 0) };
29-
} catch (err) {
29+
} catch (_err) {
3030
return { count: 0 };
3131
}
3232
});

app/web/src/newhotness/logic_composables/watched_form.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const useWatchedForm = <Data extends Record<string, string>>(label: strin
130130
try {
131131
await onSubmit(props);
132132
hasSubmitted = true;
133-
} catch (e) {
133+
} catch (_e) {
134134
// TODO report errors and display on caller forms
135135
// Cancel the spinner and bifrosting on failure
136136
markComplete();

0 commit comments

Comments
 (0)