chore(lint): enable low-noise rules

This commit is contained in:
Peter Steinberger
2026-04-18 18:09:18 +01:00
parent 07785c6dbc
commit cd2ef0f3a3
6 changed files with 8 additions and 11 deletions

View File

@@ -20,12 +20,12 @@
"typescript/consistent-return": "error",
"typescript/no-explicit-any": "error",
"typescript/no-extraneous-class": "error",
"typescript/no-meaningless-void-operator": "off",
"typescript/no-unnecessary-type-assertion": "off",
"typescript/no-meaningless-void-operator": "error",
"typescript/no-unnecessary-type-assertion": "error",
"typescript/no-unnecessary-type-conversion": "error",
"typescript/no-unnecessary-type-parameters": "off",
"typescript/no-unsafe-type-assertion": "off",
"typescript/no-useless-default-assignment": "off",
"typescript/no-useless-default-assignment": "error",
"unicorn/consistent-function-scoping": "off",
"unicorn/prefer-set-size": "error",
"unicorn/require-post-message-target-origin": "error"

View File

@@ -254,7 +254,7 @@ async function resolveDiscordModelPickerRouteState(params: {
client: interaction.client,
threadChannel: {
id: rawChannelId,
name: "name" in channel ? (channel.name as string | undefined) : undefined,
name: "name" in channel ? channel.name : undefined,
parentId: "parentId" in channel ? (channel.parentId ?? undefined) : undefined,
parent: undefined,
},

View File

@@ -1733,7 +1733,7 @@ export async function runEmbeddedPiAgent(
source: "planning_only_retry",
},
});
void params.onAgentEvent?.({
params.onAgentEvent?.({
stream: "plan",
data: {
phase: "update",

View File

@@ -493,7 +493,7 @@ describe("callGateway url resolution", () => {
},
start() {
sawYieldBeforeStart = preConnectYieldRan;
void opts.onHelloOk?.({
opts.onHelloOk?.({
features: {
methods: helloMethods ?? [],
events: [],

View File

@@ -96,7 +96,7 @@ beforeEach(() => {
async function invokeUpdateRun(
params: Record<string, unknown>,
respond: ((ok: boolean, response?: unknown) => void) | undefined = undefined,
respond?: (ok: boolean, response?: unknown) => void,
) {
const { updateHandlers } = await import("./update.js");
const onRespond = respond ?? (() => {});

View File

@@ -731,10 +731,7 @@ describe("listSessionsFromStore selected model display", () => {
});
describe("resolveSessionModelIdentityRef", () => {
const resolveLegacyIdentityRef = (
cfg: OpenClawConfig,
modelProvider: string | undefined = undefined,
) =>
const resolveLegacyIdentityRef = (cfg: OpenClawConfig, modelProvider?: string) =>
resolveSessionModelIdentityRef(cfg, {
sessionId: "legacy-session",
updatedAt: Date.now(),