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

@@ -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) {

View File

@@ -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';

View File

@@ -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;

View File

@@ -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 [];

View File

@@ -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';