From 44a331929f2b2d78f96052881861302d25a09039 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Fri, 13 Mar 2026 08:24:34 -0700 Subject: [PATCH] Enable type-aware linting and replace biome-ignore with oxlint-disable - Enable typeAware option and no-explicit-any (error) in vite.config.ts - Ignore generated binding files from linting - Convert all 96 biome-ignore comments to oxlint-disable equivalents - Add suppression comments for 3 previously uncovered any usages Co-Authored-By: Claude Opus 4.6 --- crates/yaak-models/guest-js/store.ts | 1 + packages/common-lib/debounce.ts | 4 ++-- .../src/plugins/AuthenticationPlugin.ts | 2 +- .../src/plugins/Context.ts | 2 +- .../src/plugins/TemplateFunctionPlugin.ts | 2 +- packages/plugin-runtime/src/PluginInstance.ts | 4 ++-- plugins/auth-ntlm/tests/index.test.ts | 1 + plugins/auth-oauth2/src/fetchAccessToken.ts | 2 +- .../auth-oauth2/src/getOrRefreshAccessToken.ts | 2 +- .../src/grants/clientCredentials.ts | 1 + plugins/filter-xpath/src/index.ts | 2 +- plugins/importer-curl/src/index.ts | 2 +- plugins/importer-insomnia/src/common.ts | 2 +- plugins/importer-insomnia/src/v4.ts | 2 +- plugins/importer-insomnia/src/v5.ts | 2 +- plugins/importer-openapi/src/index.ts | 4 ++-- plugins/importer-yaak/src/index.ts | 2 +- .../template-function-1password/src/index.ts | 2 +- plugins/template-function-prompt/src/index.ts | 2 +- plugins/template-function-xml/src/index.ts | 2 +- src-web/commands/commands.tsx | 2 +- src-web/components/EnvironmentEditDialog.tsx | 2 +- src-web/components/ExportDataDialog.tsx | 2 +- .../components/GrpcProtoSelectionDialog.tsx | 2 +- src-web/components/GrpcResponsePane.tsx | 2 +- src-web/components/ImportCurlButton.tsx | 2 +- src-web/components/ResponseCookies.tsx | 4 ++-- src-web/components/ResponseHeaders.tsx | 4 ++-- src-web/components/RouteError.tsx | 2 +- .../Settings/SettingsCertificates.tsx | 2 +- src-web/components/TemplateFunctionDialog.tsx | 2 +- .../components/WorkspaceEncryptionSetting.tsx | 2 +- src-web/components/core/DetailsBanner.tsx | 2 +- src-web/components/core/Dropdown.tsx | 10 +++++----- src-web/components/core/Editor/Editor.tsx | 4 ++-- .../components/core/Editor/filter/filter.ts | 2 +- .../core/Editor/hyperlink/extension.ts | 2 +- src-web/components/core/Editor/json-lint.ts | 2 +- .../components/core/Editor/twig/twig.test.ts | 2 +- src-web/components/core/Hotkey.tsx | 2 +- src-web/components/core/Input.tsx | 2 +- src-web/components/core/JsonAttributeTree.tsx | 6 +++--- src-web/components/core/KeyValueRow.tsx | 2 +- src-web/components/core/Label.tsx | 2 +- src-web/components/core/PairEditor.tsx | 2 +- src-web/components/core/PlainInput.tsx | 2 +- src-web/components/core/Stacks.tsx | 6 +++--- src-web/components/core/Tooltip.tsx | 2 +- src-web/components/core/tree/Tree.tsx | 4 ++-- .../components/core/tree/TreeIndentGuide.tsx | 2 +- src-web/components/core/tree/common.ts | 2 +- .../components/graphql/GraphQLDocsExplorer.tsx | 18 +++++++++--------- .../components/responseViewers/AudioViewer.tsx | 2 +- .../components/responseViewers/CsvViewer.tsx | 2 +- .../responseViewers/MultipartViewer.tsx | 2 +- .../components/responseViewers/VideoViewer.tsx | 2 +- src-web/hooks/useActiveCookieJar.ts | 2 +- src-web/hooks/useFastMutation.ts | 2 +- src-web/hooks/useFolderActions.ts | 2 +- src-web/hooks/useGrpcRequestActions.ts | 2 +- src-web/hooks/useHttpRequestActions.ts | 2 +- src-web/hooks/useIntrospectGraphQL.ts | 6 +++--- src-web/hooks/useKeyValue.ts | 4 ++-- src-web/hooks/useKeyboardEvent.ts | 2 +- src-web/hooks/useRequestEditor.tsx | 2 +- src-web/hooks/useStateWithDeps.ts | 2 +- src-web/hooks/useWebsocketRequestActions.ts | 2 +- src-web/hooks/useWorkspaceActions.ts | 2 +- src-web/lib/getNodeText.ts | 2 +- src-web/lib/setWorkspaceSearchParams.ts | 4 ++-- src-web/lib/theme/window.ts | 2 +- .../routes/workspaces/$workspaceId/index.tsx | 2 +- vite.config.ts | 8 +++++++- 73 files changed, 106 insertions(+), 97 deletions(-) diff --git a/crates/yaak-models/guest-js/store.ts b/crates/yaak-models/guest-js/store.ts index 6cd4d8cb..38ff71f9 100644 --- a/crates/yaak-models/guest-js/store.ts +++ b/crates/yaak-models/guest-js/store.ts @@ -88,6 +88,7 @@ export function getAnyModel( ): AnyModel | null { let data = mustStore().get(modelStoreDataAtom); for (const t of Object.keys(data)) { + // oxlint-disable-next-line no-explicit-any let v = (data as any)[t]?.[id]; if (v?.model === t) return v; } diff --git a/packages/common-lib/debounce.ts b/packages/common-lib/debounce.ts index 4118f25b..e6dc28aa 100644 --- a/packages/common-lib/debounce.ts +++ b/packages/common-lib/debounce.ts @@ -1,7 +1,7 @@ -// biome-ignore lint/suspicious/noExplicitAny: none +// oxlint-disable-next-line no-explicit-any export function debounce(fn: (...args: any[]) => void, delay = 500) { let timer: ReturnType; - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any const result = (...args: any[]) => { clearTimeout(timer); timer = setTimeout(() => fn(...args), delay); diff --git a/packages/plugin-runtime-types/src/plugins/AuthenticationPlugin.ts b/packages/plugin-runtime-types/src/plugins/AuthenticationPlugin.ts index 5da5f0b9..4102c27d 100644 --- a/packages/plugin-runtime-types/src/plugins/AuthenticationPlugin.ts +++ b/packages/plugin-runtime-types/src/plugins/AuthenticationPlugin.ts @@ -16,7 +16,7 @@ type AddDynamicMethod = { ) => MaybePromise | null | undefined>; }; -// biome-ignore lint/suspicious/noExplicitAny: distributive conditional type pattern +// oxlint-disable-next-line no-explicit-any -- distributive conditional type pattern type AddDynamic = T extends any ? T extends { inputs?: FormInput[] } ? Omit & { diff --git a/packages/plugin-runtime-types/src/plugins/Context.ts b/packages/plugin-runtime-types/src/plugins/Context.ts index 7191a4c6..1e139b6c 100644 --- a/packages/plugin-runtime-types/src/plugins/Context.ts +++ b/packages/plugin-runtime-types/src/plugins/Context.ts @@ -42,7 +42,7 @@ type AddDynamicMethod = { ) => MaybePromise | null | undefined>; }; -// biome-ignore lint/suspicious/noExplicitAny: distributive conditional type pattern +// oxlint-disable-next-line no-explicit-any -- distributive conditional type pattern type AddDynamic = T extends any ? T extends { inputs?: FormInput[] } ? Omit & { diff --git a/packages/plugin-runtime-types/src/plugins/TemplateFunctionPlugin.ts b/packages/plugin-runtime-types/src/plugins/TemplateFunctionPlugin.ts index b589e14e..747c4b7d 100644 --- a/packages/plugin-runtime-types/src/plugins/TemplateFunctionPlugin.ts +++ b/packages/plugin-runtime-types/src/plugins/TemplateFunctionPlugin.ts @@ -9,7 +9,7 @@ type AddDynamicMethod = { ) => MaybePromise | null | undefined>; }; -// biome-ignore lint/suspicious/noExplicitAny: distributive conditional type pattern +// oxlint-disable-next-line no-explicit-any -- distributive conditional type pattern type AddDynamic = T extends any ? T extends { inputs?: FormInput[] } ? Omit & { diff --git a/packages/plugin-runtime/src/PluginInstance.ts b/packages/plugin-runtime/src/PluginInstance.ts index 4516aae7..d8459a20 100644 --- a/packages/plugin-runtime/src/PluginInstance.ts +++ b/packages/plugin-runtime/src/PluginInstance.ts @@ -910,7 +910,7 @@ export class PluginInstance { render: async (args: TemplateRenderRequest) => { const payload = { type: 'template_render_request', ...args } as const; const result = await this.#sendForReply(context, payload); - // biome-ignore lint/suspicious/noExplicitAny: That's okay + // oxlint-disable-next-line no-explicit-any -- That's okay return result.data as any; }, }, @@ -973,7 +973,7 @@ export class PluginInstance { function stripDynamicCallbacks(inputs: { dynamic?: unknown }[]): FormInput[] { return inputs.map((input) => { - // biome-ignore lint/suspicious/noExplicitAny: stripping dynamic from union type + // oxlint-disable-next-line no-explicit-any -- stripping dynamic from union type const { dynamic: _dynamic, ...rest } = input as any; if ('inputs' in rest && Array.isArray(rest.inputs)) { rest.inputs = stripDynamicCallbacks(rest.inputs); diff --git a/plugins/auth-ntlm/tests/index.test.ts b/plugins/auth-ntlm/tests/index.test.ts index 1eb30cc8..0ee52069 100644 --- a/plugins/auth-ntlm/tests/index.test.ts +++ b/plugins/auth-ntlm/tests/index.test.ts @@ -17,6 +17,7 @@ describe('auth-ntlm', () => { ntlmMock.parseType2Message.mockReset(); ntlmMock.createType3Message.mockReset(); ntlmMock.createType1Message.mockReturnValue('NTLM TYPE1'); + // oxlint-disable-next-line no-explicit-any ntlmMock.parseType2Message.mockReturnValue({} as any); ntlmMock.createType3Message.mockReturnValue('NTLM TYPE3'); }); diff --git a/plugins/auth-oauth2/src/fetchAccessToken.ts b/plugins/auth-oauth2/src/fetchAccessToken.ts index d0c28c8d..05b524e8 100644 --- a/plugins/auth-oauth2/src/fetchAccessToken.ts +++ b/plugins/auth-oauth2/src/fetchAccessToken.ts @@ -71,7 +71,7 @@ export async function fetchAccessToken( throw new Error(`Failed to fetch access token with status=${resp.status} and body=${body}`); } - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any let response: any; try { response = JSON.parse(body); diff --git a/plugins/auth-oauth2/src/getOrRefreshAccessToken.ts b/plugins/auth-oauth2/src/getOrRefreshAccessToken.ts index fcd47148..be643b59 100644 --- a/plugins/auth-oauth2/src/getOrRefreshAccessToken.ts +++ b/plugins/auth-oauth2/src/getOrRefreshAccessToken.ts @@ -91,7 +91,7 @@ export async function getOrRefreshAccessToken( throw new Error(`Failed to refresh access token with status=${resp.status} and body=${body}`); } - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any let response: any; try { response = JSON.parse(body); diff --git a/plugins/auth-oauth2/src/grants/clientCredentials.ts b/plugins/auth-oauth2/src/grants/clientCredentials.ts index 3658a04c..a0dca5f6 100644 --- a/plugins/auth-oauth2/src/grants/clientCredentials.ts +++ b/plugins/auth-oauth2/src/grants/clientCredentials.ts @@ -53,6 +53,7 @@ function buildClientAssertionJwt(params: { signingKey = secret; } else if (trimmed.startsWith('{')) { // Looks like JSON - treat as JWK. There is surely a better way to detect JWK vs a raw secret, but this should work in most cases. + // oxlint-disable-next-line no-explicit-any let jwk: any; try { jwk = JSON.parse(trimmed); diff --git a/plugins/filter-xpath/src/index.ts b/plugins/filter-xpath/src/index.ts index 091d2bb3..22e90ebd 100644 --- a/plugins/filter-xpath/src/index.ts +++ b/plugins/filter-xpath/src/index.ts @@ -8,7 +8,7 @@ export const plugin: PluginDefinition = { name: 'XPath', description: 'Filter XPath', onFilter(_ctx, args) { - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any const doc: any = new DOMParser().parseFromString(args.payload, 'text/xml'); try { const result = xpath.select(args.filter, doc, false); diff --git a/plugins/importer-curl/src/index.ts b/plugins/importer-curl/src/index.ts index c7f2cf86..53c99074 100644 --- a/plugins/importer-curl/src/index.ts +++ b/plugins/importer-curl/src/index.ts @@ -48,7 +48,7 @@ export const plugin: PluginDefinition = { name: 'cURL', description: 'Import cURL commands', onImport(_ctx: Context, args: { text: string }) { - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any return convertCurl(args.text) as any; }, }, diff --git a/plugins/importer-insomnia/src/common.ts b/plugins/importer-insomnia/src/common.ts index 209df933..04f0aa75 100644 --- a/plugins/importer-insomnia/src/common.ts +++ b/plugins/importer-insomnia/src/common.ts @@ -30,7 +30,7 @@ export function deleteUndefinedAttrs(obj: T): T { /** Recursively render all nested object properties */ export function convertTemplateSyntax(obj: T): T { if (typeof obj === 'string') { - // biome-ignore lint/suspicious/noTemplateCurlyInString: Yaak template syntax + // oxlint-disable-next-line no-template-curly-in-string -- Yaak template syntax return obj.replaceAll(/{{\s*(_\.)?([^}]+)\s*}}/g, '${[$2]}') as T; } if (Array.isArray(obj) && obj != null) { diff --git a/plugins/importer-insomnia/src/v4.ts b/plugins/importer-insomnia/src/v4.ts index 412cce80..9f895339 100644 --- a/plugins/importer-insomnia/src/v4.ts +++ b/plugins/importer-insomnia/src/v4.ts @@ -1,4 +1,4 @@ -// biome-ignore-all lint/suspicious/noExplicitAny: too flexible for strict types +/* oxlint-disable no-explicit-any */ import type { PartialImportResources } from '@yaakapp/api'; import { convertId, convertTemplateSyntax, isJSObject } from './common'; diff --git a/plugins/importer-insomnia/src/v5.ts b/plugins/importer-insomnia/src/v5.ts index a8434a2c..6a236df8 100644 --- a/plugins/importer-insomnia/src/v5.ts +++ b/plugins/importer-insomnia/src/v5.ts @@ -1,4 +1,4 @@ -// biome-ignore-all lint/suspicious/noExplicitAny: too flexible for strict types +/* oxlint-disable no-explicit-any */ import type { PartialImportResources } from '@yaakapp/api'; import { convertId, convertTemplateSyntax, isJSObject } from './common'; diff --git a/plugins/importer-openapi/src/index.ts b/plugins/importer-openapi/src/index.ts index 33844be0..9e0e83e0 100644 --- a/plugins/importer-openapi/src/index.ts +++ b/plugins/importer-openapi/src/index.ts @@ -14,11 +14,11 @@ export const plugin: PluginDefinition = { }; export async function convertOpenApi(contents: string): Promise { - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any let postmanCollection: any; try { postmanCollection = await new Promise((resolve, reject) => { - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any convert({ type: 'string', data: contents }, {}, (err, result: any) => { if (err != null) reject(err); diff --git a/plugins/importer-yaak/src/index.ts b/plugins/importer-yaak/src/index.ts index bc215ea7..93fca0dd 100644 --- a/plugins/importer-yaak/src/index.ts +++ b/plugins/importer-yaak/src/index.ts @@ -11,7 +11,7 @@ export const plugin: PluginDefinition = { }; export function migrateImport(contents: string) { - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any let parsed: any; try { parsed = JSON.parse(contents); diff --git a/plugins/template-function-1password/src/index.ts b/plugins/template-function-1password/src/index.ts index af11dd02..f5363348 100644 --- a/plugins/template-function-1password/src/index.ts +++ b/plugins/template-function-1password/src/index.ts @@ -123,7 +123,7 @@ export const plugin: PluginDefinition = { { name: 'token', type: 'text', - // biome-ignore lint/suspicious/noTemplateCurlyInString: Yaak template syntax + // oxlint-disable-next-line no-template-curly-in-string -- Yaak template syntax defaultValue: '${[1PASSWORD_TOKEN]}', dynamic(_ctx, args) { switch (args.values.authMethod) { diff --git a/plugins/template-function-prompt/src/index.ts b/plugins/template-function-prompt/src/index.ts index bc8a008d..4247954f 100644 --- a/plugins/template-function-prompt/src/index.ts +++ b/plugins/template-function-prompt/src/index.ts @@ -53,7 +53,7 @@ export const plugin: PluginDefinition = { type: 'text', name: 'namespace', label: 'Namespace', - // biome-ignore lint/suspicious/noTemplateCurlyInString: Yaak template syntax + // oxlint-disable-next-line no-template-curly-in-string -- Yaak template syntax defaultValue: '${[ctx.workspace()]}', optional: true, }, diff --git a/plugins/template-function-xml/src/index.ts b/plugins/template-function-xml/src/index.ts index 3ba77924..01279588 100755 --- a/plugins/template-function-xml/src/index.ts +++ b/plugins/template-function-xml/src/index.ts @@ -69,7 +69,7 @@ export function filterXPath( result: XPathResult, join: string | null, ): string { - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any const doc: any = new DOMParser().parseFromString(body, 'text/xml'); const items = xpath.select(path, doc, false); diff --git a/src-web/commands/commands.tsx b/src-web/commands/commands.tsx index 53eea3c3..846ec262 100644 --- a/src-web/commands/commands.tsx +++ b/src-web/commands/commands.tsx @@ -143,7 +143,7 @@ export const syncWorkspace = createFastMutation< } return ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line react/no-array-index-key {model} {name} diff --git a/src-web/components/EnvironmentEditDialog.tsx b/src-web/components/EnvironmentEditDialog.tsx index b9104b9a..c35e1b55 100644 --- a/src-web/components/EnvironmentEditDialog.tsx +++ b/src-web/components/EnvironmentEditDialog.tsx @@ -113,7 +113,7 @@ function EnvironmentEditDialogSidebar({ const treeRef = useRef(null); const { baseEnvironment, baseEnvironments } = useEnvironmentsBreakdown(); - // biome-ignore lint/correctness/useExhaustiveDependencies: none + // oxlint-disable-next-line react-hooks/exhaustive-deps useLayoutEffect(() => { if (selectedEnvironmentId == null) return; treeRef.current?.selectItem(selectedEnvironmentId); diff --git a/src-web/components/ExportDataDialog.tsx b/src-web/components/ExportDataDialog.tsx index 89942fed..cd2589f5 100644 --- a/src-web/components/ExportDataDialog.tsx +++ b/src-web/components/ExportDataDialog.tsx @@ -55,7 +55,7 @@ function ExportDataDialogContent({ const handleToggleAll = () => { setSelectedWorkspaces( - // biome-ignore lint/performance/noAccumulatingSpread: none + // oxlint-disable-next-line no-accumulating-spread allSelected ? {} : workspaces.reduce((acc, w) => ({ ...acc, [w.id]: true }), {}), ); }; diff --git a/src-web/components/GrpcProtoSelectionDialog.tsx b/src-web/components/GrpcProtoSelectionDialog.tsx index 2b89faf2..83b4d27c 100644 --- a/src-web/components/GrpcProtoSelectionDialog.tsx +++ b/src-web/components/GrpcProtoSelectionDialog.tsx @@ -144,7 +144,7 @@ function GrpcProtoSelectionDialogWithRequest({ request }: Props & { request: Grp {protoFiles.map((f, i) => { const parts = f.split('/'); return ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line react/no-array-index-key diff --git a/src-web/components/GrpcResponsePane.tsx b/src-web/components/GrpcResponsePane.tsx index 29f8f4e0..ae01dd8f 100644 --- a/src-web/components/GrpcResponsePane.tsx +++ b/src-web/components/GrpcResponsePane.tsx @@ -50,7 +50,7 @@ export function GrpcResponsePane({ style, methodType, activeRequest }: Props) { ); // Set the active message to the first message received if unary - // biome-ignore lint/correctness/useExhaustiveDependencies: none + // oxlint-disable-next-line react-hooks/exhaustive-deps useEffect(() => { if (events.length === 0 || activeEvent != null || methodType !== 'unary') { return; diff --git a/src-web/components/ImportCurlButton.tsx b/src-web/components/ImportCurlButton.tsx index c495b5c0..1c640c35 100644 --- a/src-web/components/ImportCurlButton.tsx +++ b/src-web/components/ImportCurlButton.tsx @@ -14,7 +14,7 @@ export function ImportCurlButton() { const importCurl = useImportCurl(); const [isLoading, setIsLoading] = useState(false); - // biome-ignore lint/correctness/useExhaustiveDependencies: none + // oxlint-disable-next-line react-hooks/exhaustive-deps useEffect(() => { fireAndForget(readText().then(setClipboardText)); }, [focused]); diff --git a/src-web/components/ResponseCookies.tsx b/src-web/components/ResponseCookies.tsx index 5e217a9c..a7013961 100644 --- a/src-web/components/ResponseCookies.tsx +++ b/src-web/components/ResponseCookies.tsx @@ -130,7 +130,7 @@ export function ResponseCookies({ response }: Props) { ) : ( {sentCookies.map((cookie, i) => ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line react/no-array-index-key {cookie.value} @@ -153,7 +153,7 @@ export function ResponseCookies({ response }: Props) { ) : (
{receivedCookies.map((cookie, i) => ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line react/no-array-index-key
{requestHeaders.map((h, i) => ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line react/no-array-index-key {h.value} @@ -84,7 +84,7 @@ export function ResponseHeaders({ response }: Props) { ) : ( {responseHeaders.map((h, i) => ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line react/no-array-index-key {h.value} diff --git a/src-web/components/RouteError.tsx b/src-web/components/RouteError.tsx index d6ec5cdc..3299fcec 100644 --- a/src-web/components/RouteError.tsx +++ b/src-web/components/RouteError.tsx @@ -7,7 +7,7 @@ import { VStack } from './core/Stacks'; export default function RouteError({ error }: { error: unknown }) { console.log('Error', error); const stringified = JSON.stringify(error); - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any const message = (error as any).message ?? stringified; const stack = typeof error === 'object' && error != null && 'stack' in error ? String(error.stack) : null; diff --git a/src-web/components/Settings/SettingsCertificates.tsx b/src-web/components/Settings/SettingsCertificates.tsx index e6081e72..6146576a 100644 --- a/src-web/components/Settings/SettingsCertificates.tsx +++ b/src-web/components/Settings/SettingsCertificates.tsx @@ -238,7 +238,7 @@ export function SettingsCertificates() { {certificates.map((cert, index) => ( 10000 : false; - // biome-ignore lint/correctness/useExhaustiveDependencies: Only update this on rendered data change to keep secrets hidden on input change + // oxlint-disable-next-line react-hooks/exhaustive-deps -- Only update this on rendered data change to keep secrets hidden on input change const dataContainsSecrets = useMemo(() => { for (const [name, value] of Object.entries(argValues)) { const arg = templateFunction.data?.args.find((a) => 'name' in a && a.name === name); diff --git a/src-web/components/WorkspaceEncryptionSetting.tsx b/src-web/components/WorkspaceEncryptionSetting.tsx index b55e9dd7..b9c6ebf5 100644 --- a/src-web/components/WorkspaceEncryptionSetting.tsx +++ b/src-web/components/WorkspaceEncryptionSetting.tsx @@ -285,7 +285,7 @@ function HighlightedKey({ keyText, show }: { keyText: string; show: boolean }) { keyText.split('').map((c, i) => { return ( storageKey diff --git a/src-web/components/core/Dropdown.tsx b/src-web/components/core/Dropdown.tsx index a7534b43..8fa19f36 100644 --- a/src-web/components/core/Dropdown.tsx +++ b/src-web/components/core/Dropdown.tsx @@ -753,7 +753,7 @@ const Menu = forwardRef @@ -763,8 +763,8 @@ const Menu = forwardRef {item.label}
@@ -778,7 +778,7 @@ const Menu = forwardRef @@ -786,7 +786,7 @@ const Menu = forwardRef {activeSubmenu && ( - // biome-ignore lint/a11y/noStaticElementInteractions: Container div that cancels hover timeout + // oxlint-disable-next-line jsx-a11y/no-static-element-interactions -- Container div that cancels hover timeout
{ diff --git a/src-web/components/core/Editor/Editor.tsx b/src-web/components/core/Editor/Editor.tsx index 01ff2d21..64e58675 100644 --- a/src-web/components/core/Editor/Editor.tsx +++ b/src-web/components/core/Editor/Editor.tsx @@ -327,7 +327,7 @@ function EditorInner({ ); // Update the language extension when the language changes - // biome-ignore lint/correctness/useExhaustiveDependencies: intentionally limited deps + // oxlint-disable-next-line react-hooks/exhaustive-deps -- intentionally limited deps useEffect(() => { if (cm.current === null) return; const { view, languageCompartment } = cm.current; @@ -361,7 +361,7 @@ function EditorInner({ ]); // Initialize the editor when ref mounts - // biome-ignore lint/correctness/useExhaustiveDependencies: only reinitialize when necessary + // oxlint-disable-next-line react-hooks/exhaustive-deps -- only reinitialize when necessary const initEditorRef = useCallback( function initEditorRef(container: HTMLDivElement | null) { if (container === null) { diff --git a/src-web/components/core/Editor/filter/filter.ts b/src-web/components/core/Editor/filter/filter.ts index 70a2310a..e943978f 100644 --- a/src-web/components/core/Editor/filter/filter.ts +++ b/src-web/components/core/Editor/filter/filter.ts @@ -1,4 +1,4 @@ -// biome-ignore-all lint: Disable for generated file +/* oxlint-disable */ // This file was generated by lezer-generator. You probably shouldn't edit it. import { LRParser } from '@lezer/lr'; import { highlight } from './highlight'; diff --git a/src-web/components/core/Editor/hyperlink/extension.ts b/src-web/components/core/Editor/hyperlink/extension.ts index e8c995be..73e5cf8e 100644 --- a/src-web/components/core/Editor/hyperlink/extension.ts +++ b/src-web/components/core/Editor/hyperlink/extension.ts @@ -14,7 +14,7 @@ const tooltip = hoverTooltip( let match: RegExpExecArray | null; let found: { start: number; end: number } | null = null; - // biome-ignore lint/suspicious/noAssignInExpressions: none + // oxlint-disable-next-line no-cond-assign while ((match = REGEX.exec(text))) { const start = from + match.index; const end = start + match[0].length; diff --git a/src-web/components/core/Editor/json-lint.ts b/src-web/components/core/Editor/json-lint.ts index 32652f15..cb859ad1 100644 --- a/src-web/components/core/Editor/json-lint.ts +++ b/src-web/components/core/Editor/json-lint.ts @@ -20,7 +20,7 @@ export function jsonParseLinter(options?: JsonLintOptions) { mode: (options?.allowComments ?? true) ? 'cjson' : 'json', ignoreTrailingCommas: options?.allowTrailingCommas ?? false, }); - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any } catch (err: any) { if (!('location' in err)) { return []; diff --git a/src-web/components/core/Editor/twig/twig.test.ts b/src-web/components/core/Editor/twig/twig.test.ts index ca4b8304..016ed6e1 100644 --- a/src-web/components/core/Editor/twig/twig.test.ts +++ b/src-web/components/core/Editor/twig/twig.test.ts @@ -1,4 +1,4 @@ -// biome-ignore-all lint/suspicious/noTemplateCurlyInString: We're testing this, specifically +/* oxlint-disable no-template-curly-in-string */ import { describe, expect, test } from 'vite-plus/test'; import { parser } from './twig'; diff --git a/src-web/components/core/Hotkey.tsx b/src-web/components/core/Hotkey.tsx index 4a556a83..8d020e21 100644 --- a/src-web/components/core/Hotkey.tsx +++ b/src-web/components/core/Hotkey.tsx @@ -35,7 +35,7 @@ export function HotkeyRaw({ labelParts, className, variant }: HotkeyRawProps) { )} > {labelParts.map((char, index) => ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line react/no-array-index-key
{char}
diff --git a/src-web/components/core/Input.tsx b/src-web/components/core/Input.tsx index 7d35ca62..a92a5b7e 100644 --- a/src-web/components/core/Input.tsx +++ b/src-web/components/core/Input.tsx @@ -144,7 +144,7 @@ function BaseInput({ isFocused: () => editorRef.current?.hasFocus ?? false, value: () => editorRef.current?.state.doc.toString() ?? '', dispatch: (...args) => { - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any editorRef.current?.dispatch(...(args as any)); }, selectAll() { diff --git a/src-web/components/core/JsonAttributeTree.tsx b/src-web/components/core/JsonAttributeTree.tsx index 1a692746..cbc21955 100644 --- a/src-web/components/core/JsonAttributeTree.tsx +++ b/src-web/components/core/JsonAttributeTree.tsx @@ -5,7 +5,7 @@ import { Icon } from './Icon'; interface Props { depth?: number; - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any attrValue: any; attrKey?: string | number; attrKeyJsonPath?: string; @@ -54,10 +54,10 @@ export const JsonAttributeTree = ({ if (jsonType === '[object Array]') { return { children: isExpanded - ? // biome-ignore lint/suspicious/noExplicitAny: none + ? // oxlint-disable-next-line no-explicit-any attrValue.flatMap((v: any, i: number) => ( {childArray.map((child, i) => ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line react/no-array-index-key {child} ))} diff --git a/src-web/components/core/Label.tsx b/src-web/components/core/Label.tsx index e93a8742..afcc3725 100644 --- a/src-web/components/core/Label.tsx +++ b/src-web/components/core/Label.tsx @@ -37,7 +37,7 @@ export function Label({ {required === true && *} {tags.map((tag, i) => ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line react/no-array-index-key ({tag}) diff --git a/src-web/components/core/PairEditor.tsx b/src-web/components/core/PairEditor.tsx index 64ebd749..2b7b7867 100644 --- a/src-web/components/core/PairEditor.tsx +++ b/src-web/components/core/PairEditor.tsx @@ -145,7 +145,7 @@ export function PairEditor({ [handle, pairs, setRef], ); - // biome-ignore lint/correctness/useExhaustiveDependencies: Only care about forceUpdateKey + // oxlint-disable-next-line react-hooks/exhaustive-deps -- Only care about forceUpdateKey useEffect(() => { // Remove empty headers on initial render and ensure they all have valid ids (pairs didn't use to have IDs) const newPairs: PairWithId[] = []; diff --git a/src-web/components/core/PlainInput.tsx b/src-web/components/core/PlainInput.tsx index fa4e827a..304ea0ec 100644 --- a/src-web/components/core/PlainInput.tsx +++ b/src-web/components/core/PlainInput.tsx @@ -195,7 +195,7 @@ export const PlainInput = forwardRef<{ focus: () => void }, PlainInputProps>(fun key={forceUpdateKey} type={type === 'password' && !obscured ? 'text' : type} name={name} - // biome-ignore lint/a11y/noAutofocus: Who cares + // oxlint-disable-next-line jsx-a11y/no-autofocus autoFocus={autoFocus} defaultValue={defaultValue ?? undefined} autoComplete="off" diff --git a/src-web/components/core/Stacks.tsx b/src-web/components/core/Stacks.tsx index 074f99ba..46e5935b 100644 --- a/src-web/components/core/Stacks.tsx +++ b/src-web/components/core/Stacks.tsx @@ -20,7 +20,7 @@ interface HStackProps extends BaseStackProps { export const HStack = forwardRef(function HStack( { className, space, children, alignItems = 'center', ...props }: HStackProps, - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any ref: ForwardedRef, ) { return ( @@ -41,7 +41,7 @@ export type VStackProps = BaseStackProps & { export const VStack = forwardRef(function VStack( { className, space, children, ...props }: VStackProps, - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any ref: ForwardedRef, ) { return ( @@ -65,7 +65,7 @@ type BaseStackProps = HTMLAttributes & { const BaseStack = forwardRef(function BaseStack( { className, alignItems, justifyContent, wrap, children, as, ...props }: BaseStackProps, - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any ref: ForwardedRef, ) { const Component = as ?? 'div'; diff --git a/src-web/components/core/Tooltip.tsx b/src-web/components/core/Tooltip.tsx index 563eb854..194f8dd4 100644 --- a/src-web/components/core/Tooltip.tsx +++ b/src-web/components/core/Tooltip.tsx @@ -110,7 +110,7 @@ export function Tooltip({ children, className, content, tabIndex, size = 'md' }: />
- {/** biome-ignore lint/a11y/useSemanticElements: Needs to be usable in other buttons */} + {/* oxlint-disable-next-line jsx-a11y/prefer-tag-over-role -- Needs to be usable in other buttons */} ( }, []); // Select the first item on first render - // biome-ignore lint/correctness/useExhaustiveDependencies: Only used for initial render + // oxlint-disable-next-line react-hooks/exhaustive-deps -- Only used for initial render useEffect(() => { const ids = jotaiStore.get(selectedIdsFamily(treeId)); const fallback = selectableItems[0]; @@ -736,7 +736,7 @@ function DropRegionAfterList({ onContextMenu?: (e: MouseEvent) => void; }) { const { setNodeRef } = useDroppable({ id }); - // biome-ignore lint/a11y/noStaticElementInteractions: Meh + // oxlint-disable-next-line jsx-a11y/no-static-element-interactions return
; } diff --git a/src-web/components/core/tree/TreeIndentGuide.tsx b/src-web/components/core/tree/TreeIndentGuide.tsx index 55671b0d..1273ed55 100644 --- a/src-web/components/core/tree/TreeIndentGuide.tsx +++ b/src-web/components/core/tree/TreeIndentGuide.tsx @@ -19,7 +19,7 @@ export const TreeIndentGuide = memo(function TreeIndentGuide({
{Array.from({ length: depth }).map((_, i) => (
( } for (let i = 0; i < ak.length; i++) { - // biome-ignore lint/style/noNonNullAssertion: none + // oxlint-disable-next-line no-non-null-assertion if (!equalSubtree(ak[i]!, bk[i]!, getItemKey)) return false; } diff --git a/src-web/components/graphql/GraphQLDocsExplorer.tsx b/src-web/components/graphql/GraphQLDocsExplorer.tsx index 952d51fa..230ebaf4 100644 --- a/src-web/components/graphql/GraphQLDocsExplorer.tsx +++ b/src-web/components/graphql/GraphQLDocsExplorer.tsx @@ -45,7 +45,7 @@ interface Props { type ExplorerItem = | { kind: 'type'; type: GraphQLType; from: ExplorerItem } - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any | { kind: 'field'; type: GraphQLField; from: ExplorerItem } | { kind: 'input_field'; type: GraphQLInputField; from: ExplorerItem } | null; @@ -182,14 +182,14 @@ function GraphQLExplorerHeader({ {crumbs.map((crumb, i) => { return ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line react/no-array-index-key {i > 0 && } {crumb === item || item == null ? ( ) : crumb === item ? null : ( | GraphQLInputField; score: number; from: GraphQLNamedType | null; @@ -897,10 +897,10 @@ function DocMarkdown({ children, className }: { children: string | null; classNa function walkTypeGraph( schema: GraphQLSchema, - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any start: GraphQLType | GraphQLField | GraphQLInputField | null, cb: ( - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any type: GraphQLNamedType | GraphQLField | GraphQLInputField, from: GraphQLNamedType | null, path: string[], @@ -908,7 +908,7 @@ function walkTypeGraph( ) { const visited = new Set(); const queue: Array<{ - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any current: GraphQLType | GraphQLField | GraphQLInputField; from: GraphQLNamedType | null; path: string[]; @@ -928,7 +928,7 @@ function walkTypeGraph( } while (queue.length > 0) { - // biome-ignore lint/style/noNonNullAssertion: none + // oxlint-disable-next-line no-non-null-assertion const { current, from, path } = queue.shift()!; if (!isNamedType(current)) continue; @@ -981,7 +981,7 @@ function walkTypeGraph( } } -// biome-ignore lint/suspicious/noExplicitAny: none +// oxlint-disable-next-line no-explicit-any function toExplorerItem(t: any, from: ExplorerItem | null): ExplorerItem | null { if (t == null) return null; diff --git a/src-web/components/responseViewers/AudioViewer.tsx b/src-web/components/responseViewers/AudioViewer.tsx index 145ff3fe..dd876ff0 100644 --- a/src-web/components/responseViewers/AudioViewer.tsx +++ b/src-web/components/responseViewers/AudioViewer.tsx @@ -22,6 +22,6 @@ export function AudioViewer({ bodyPath, data }: Props) { } }, [bodyPath, data]); - // biome-ignore lint/a11y/useMediaCaption: none + // oxlint-disable-next-line jsx-a11y/media-has-caption return