mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 06:57:10 +00:00
Address Obsidian review warnings
This commit is contained in:
parent
2aca116035
commit
074a379b68
3 changed files with 8 additions and 5 deletions
|
|
@ -53,7 +53,6 @@ export default defineConfig([
|
|||
prefer: "type-imports",
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/no-deprecated": "off",
|
||||
"@typescript-eslint/require-await": "off",
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -721,8 +721,12 @@ function multiSelectOptions(schema: Extract<AppServerMcpElicitationPrimitiveSche
|
|||
|
||||
function stringArrayOrEmpty(value: unknown): readonly string[] {
|
||||
if (!Array.isArray(value)) return [];
|
||||
if (!value.every((item) => typeof item === "string")) return [];
|
||||
return value;
|
||||
const strings: string[] = [];
|
||||
for (const item of value) {
|
||||
if (typeof item !== "string") return [];
|
||||
strings.push(item);
|
||||
}
|
||||
return strings;
|
||||
}
|
||||
|
||||
function enumOptions(values: unknown, labels: unknown): PendingMcpElicitationOption[] {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ButtonComponent, DropdownComponent, ExtraButtonComponent, setIcon, TextComponent, ToggleComponent } from "obsidian";
|
||||
import type { ButtonHTMLAttributes, JSX, Ref, ComponentChild as UiNode } from "preact";
|
||||
import type { ButtonHTMLAttributes, HTMLAttributes, Ref, ComponentChild as UiNode } from "preact";
|
||||
import { useLayoutEffect, useRef } from "preact/hooks";
|
||||
|
||||
import { disposeDomListeners, listenDomEvent } from "./dom-events.dom";
|
||||
|
|
@ -68,7 +68,7 @@ export function IconButton({ icon, label, buttonRef, className, children, ...pro
|
|||
);
|
||||
}
|
||||
|
||||
export type ObsidianToolbarActionProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "className"> & {
|
||||
export type ObsidianToolbarActionProps = Omit<HTMLAttributes<HTMLDivElement>, "className"> & {
|
||||
icon: string;
|
||||
label: string;
|
||||
actionRef?: Ref<HTMLDivElement>;
|
||||
|
|
|
|||
Loading…
Reference in a new issue