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 <noreply@anthropic.com>
This commit is contained in:
Gregory Schier
2026-03-13 08:24:34 -07:00
parent 7670ab007f
commit 44a331929f
73 changed files with 106 additions and 97 deletions

View File

@@ -37,7 +37,7 @@ export function useEnsureActiveCookieJar() {
// things change when switching workspaces, and we don't currently have a good way to ensure that all
// stores have updated.
// TODO: Create a global data store that can handle this case
// biome-ignore lint/correctness/useExhaustiveDependencies: none
// oxlint-disable-next-line react-hooks/exhaustive-deps
useEffect(() => {
if (cookieJars == null) return; // Hasn't loaded yet

View File

@@ -71,6 +71,6 @@ export function useFastMutation<TData = unknown, TError = unknown, TVariables =
) {
return useMemo(() => {
return createFastMutation(defaultArgs);
// biome-ignore lint/correctness/useExhaustiveDependencies: Force it!
// oxlint-disable-next-line react-hooks/exhaustive-deps -- Force it!
}, defaultArgs.mutationKey);
}

View File

@@ -21,7 +21,7 @@ export function useFolderActions() {
queryFn: () => getFolderActions(),
});
// biome-ignore lint/correctness/useExhaustiveDependencies: none
// oxlint-disable-next-line react-hooks/exhaustive-deps
const actions = useMemo(() => {
return actionsResult.data ?? [];
}, [JSON.stringify(actionsResult.data)]);

View File

@@ -24,7 +24,7 @@ export function useGrpcRequestActions() {
},
});
// biome-ignore lint/correctness/useExhaustiveDependencies: none
// oxlint-disable-next-line react-hooks/exhaustive-deps
const actions = useMemo(() => {
return actionsResult.data ?? [];
}, [JSON.stringify(actionsResult.data)]);

View File

@@ -21,7 +21,7 @@ export function useHttpRequestActions() {
queryFn: () => getHttpRequestActions(),
});
// biome-ignore lint/correctness/useExhaustiveDependencies: none
// oxlint-disable-next-line react-hooks/exhaustive-deps
const actions = useMemo(() => {
return actionsResult.data ?? [];
}, [JSON.stringify(actionsResult.data)]);

View File

@@ -86,7 +86,7 @@ export function useIntrospectGraphQL(
}
}, [activeEnvironment?.id, baseRequest, upsertIntrospection]);
// biome-ignore lint/correctness/useExhaustiveDependencies: none
// oxlint-disable-next-line react-hooks/exhaustive-deps
useEffect(() => {
// Skip introspection if automatic is disabled and we already have one
if (options.disabled) {
@@ -144,14 +144,14 @@ function tryParseIntrospectionToSchema(
let parsedResponse: IntrospectionQuery;
try {
parsedResponse = JSON.parse(content).data;
// biome-ignore lint/suspicious/noExplicitAny: none
// oxlint-disable-next-line no-explicit-any
} catch (e: any) {
return { error: String('message' in e ? e.message : e) };
}
try {
return { schema: buildClientSchema(parsedResponse, {}) };
// biome-ignore lint/suspicious/noExplicitAny: none
// oxlint-disable-next-line no-explicit-any
} catch (e: any) {
return { error: String('message' in e ? e.message : e) };
}

View File

@@ -19,7 +19,7 @@ export function useKeyValue<T extends object | boolean | number | string | null>
fallback: T;
}) {
const { value, isLoading } = useAtomValue(
// biome-ignore lint/correctness/useExhaustiveDependencies: Only create a new atom when the key changes. Fallback might not be a stable reference, so we don't want to refresh on that.
// oxlint-disable-next-line react-hooks/exhaustive-deps -- Only create a new atom when the key changes. Fallback might not be a stable reference, so we don't want to refresh on that.
useMemo(
() =>
selectAtom(
@@ -42,7 +42,7 @@ export function useKeyValue<T extends object | boolean | number | string | null>
mutationFn: (value) => setKeyValue<T>({ namespace, key, value }),
});
// biome-ignore lint/correctness/useExhaustiveDependencies: none
// oxlint-disable-next-line react-hooks/exhaustive-deps
const set = useCallback(
async (valueOrUpdate: ((v: T) => T) | T) => {
if (typeof valueOrUpdate === 'function') {

View File

@@ -5,7 +5,7 @@ export function useKeyboardEvent(
key: KeyboardEvent['key'],
cb: () => void,
) {
// biome-ignore lint/correctness/useExhaustiveDependencies: Don't have `cb` as a dep for caller convenience
// oxlint-disable-next-line react-hooks/exhaustive-deps -- Don't have `cb` as a dep for caller convenience
useEffect(() => {
const fn = (e: KeyboardEvent) => {
if (e.key === key) cb();

View File

@@ -17,7 +17,7 @@ export function useRequestEditorEvent<
return () => {
emitter.off(event, fn);
};
// biome-ignore lint/correctness/useExhaustiveDependencies: We're handing deps manually
// oxlint-disable-next-line react-hooks/exhaustive-deps -- We're handing deps manually
}, deps);
}

View File

@@ -6,7 +6,7 @@ import { useEffect, useState } from 'react';
*/
export function useStateWithDeps<T>(defaultValue: T | (() => T), deps: DependencyList) {
const [value, setValue] = useState(defaultValue);
// biome-ignore lint/correctness/useExhaustiveDependencies: none
// oxlint-disable-next-line react-hooks/exhaustive-deps
useEffect(() => {
setValue(defaultValue);
}, [...deps]);

View File

@@ -21,7 +21,7 @@ export function useWebsocketRequestActions() {
queryFn: () => getWebsocketRequestActions(),
});
// biome-ignore lint/correctness/useExhaustiveDependencies: none
// oxlint-disable-next-line react-hooks/exhaustive-deps
const actions = useMemo(() => {
return actionsResult.data ?? [];
}, [JSON.stringify(actionsResult.data)]);

View File

@@ -21,7 +21,7 @@ export function useWorkspaceActions() {
queryFn: () => getWorkspaceActions(),
});
// biome-ignore lint/correctness/useExhaustiveDependencies: none
// oxlint-disable-next-line react-hooks/exhaustive-deps
const actions = useMemo(() => {
return actionsResult.data ?? [];
}, [JSON.stringify(actionsResult.data)]);