Skip to content

Commit 957ddf9

Browse files
Nick the Sickclaude
andcommitted
refactor: replace @ts-ignore with @ts-expect-error for stricter type suppression
Replace all 5 @ts-ignore comments with @ts-expect-error across the codebase. @ts-expect-error will flag when suppressions become unnecessary, preventing stale type suppressions from accumulating. Nightshift-Task: lint-fix Nightshift-Ref: https://github.com/marcus/nightshift Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3ed8b53 commit 957ddf9

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

packages/core/src/editor/BlockNoteEditor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ export class BlockNoteEditor<
423423
},
424424
};
425425

426-
// @ts-ignore
426+
// @ts-expect-error - schema type mismatch due to conditional default
427427
this.schema = newOptions.schema;
428428
this.blockImplementations = newOptions.schema.blockSpecs;
429429
this.inlineContentImplementations = newOptions.schema.inlineContentSpecs;

packages/core/src/schema/inlineContent/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type InlineContentConfig = CustomInlineContentConfig | "text" | "link";
1515

1616
// InlineContentImplementation contains the "implementation" info about an InlineContent element
1717
// such as the functions / Nodes required to render and / or serialize it
18-
// @ts-ignore
18+
// @ts-expect-error - T extends union but conditional type only narrows custom configs
1919
export type InlineContentImplementation<T extends InlineContentConfig> =
2020
T extends "link" | "text"
2121
? undefined

packages/xl-ai/src/api/formats/tests/sharedTestCases.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { buildAIRequest } from "../../aiRequest/builder.js";
2020

2121
const BASE_FILE_PATH = path.resolve(__dirname, "__snapshots__");
2222

23-
// @ts-ignore
23+
// @ts-expect-error - unused helper kept for debugging snapshots
2424
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2525
async function matchFileSnapshot(data: any, postFix = "") {
2626
const t = getCurrentTest()!;

packages/xl-ai/src/prosemirror/rebaseTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function getApplySuggestionsTr(editor: BlockNoteEditor<any, any, any>) {
1212
applySuggestionsTr = tr;
1313
});
1414

15-
// @ts-ignore
15+
// @ts-expect-error - applySuggestionsTr is assigned inside the callback above
1616
if (!applySuggestionsTr) {
1717
throw new Error("applySuggestionsTr is not set");
1818
}

packages/xl-odt-exporter/src/odt/odtExporter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { ColumnBlock, ColumnListBlock } from "@blocknote/xl-multi-column";
1313
import { partialBlocksToBlocksForTesting } from "@shared/formatConversionTestUtil.js";
1414

1515
beforeAll(async () => {
16-
// @ts-ignore
16+
// @ts-expect-error - Blob polyfill for Node test environment
1717
globalThis.Blob = (await import("node:buffer")).Blob;
1818
});
1919

0 commit comments

Comments
 (0)