Fix lint errors

This commit is contained in:
Gregory Schier
2026-03-13 08:12:21 -07:00
parent be34dfe74a
commit 7670ab007f
44 changed files with 110 additions and 75 deletions

View File

@@ -91,7 +91,7 @@ export class PluginInstance {
);
} catch (err: unknown) {
await ctx.toast.show({
message: `Failed to initialize plugin ${this.#workerData.bootRequest.dir.split('/').pop()}: ${err}`,
message: `Failed to initialize plugin ${this.#workerData.bootRequest.dir.split('/').pop()}: ${err instanceof Error ? err.message : String(err)}`,
color: 'notice',
icon: 'alert_triangle',
timeout: 30000,
@@ -328,6 +328,7 @@ export class PluginInstance {
payload.values = applyFormInputDefaults(args, payload.values);
const resolvedArgs = await applyDynamicFormInput(ctx, args, payload);
const resolvedActions: HttpAuthenticationAction[] = [];
// oxlint-disable-next-line unbound-method
for (const { onSelect: _onSelect, ...action } of actions ?? []) {
resolvedActions.push(action);
}
@@ -474,7 +475,7 @@ export class PluginInstance {
{
type: 'call_template_function_response',
value: null,
error: `${err}`.replace(/^Error:\s*/g, ''),
error: (err instanceof Error ? err.message : String(err)).replace(/^Error:\s*/g, ''),
},
replyId,
);
@@ -483,7 +484,7 @@ export class PluginInstance {
}
}
} catch (err) {
const error = `${err}`.replace(/^Error:\s*/g, '');
const error = (err instanceof Error ? err.message : String(err)).replace(/^Error:\s*/g, '');
console.log('Plugin call threw exception', payload.type, '→', error);
this.#sendPayload(context, { type: 'error_response', error }, replyId);
return;

View File

@@ -1,3 +1,4 @@
/* oxlint-disable unbound-method */
import process from 'node:process';
export function interceptStdout(intercept: (text: string) => string) {

View File

@@ -10,11 +10,7 @@
"moduleResolution": "node16",
"resolveJsonModule": true,
"sourceMap": true,
"outDir": "build",
"baseUrl": ".",
"paths": {
"*": ["node_modules/*", "src/types/*"]
}
"outDir": "build"
},
"include": ["src"]
}