chore: enable lint rule noTsIgnore (#4296)

This commit is contained in:
Alex Yang
2025-08-28 15:09:47 -07:00
committed by GitHub
parent 7d7d1350ce
commit 70d4dc609a
28 changed files with 47 additions and 92 deletions

View File

@@ -59,7 +59,7 @@ async function generateMDX() {
const functionName = Object.keys(exports)[0]! as string;
const [path, options]: [string, Options] =
//@ts-ignore
//@ts-expect-error
await exports[Object.keys(exports)[0]!];
if (!path || !options) return console.error(`No path or options.`);
@@ -194,17 +194,17 @@ function parseZodShape(zod: z.ZodAny, path: string[]) {
{ description: "some descriptiom" },
).shape;
//@ts-ignore
//@ts-expect-error
if (zod._def.typeName === "ZodOptional") {
isRootOptional = true;
const eg = z.optional(z.object({}));
const x = zod as never as typeof eg;
//@ts-ignore
//@ts-expect-error
shape = x._def.innerType.shape;
} else {
const eg = z.object({});
const x = zod as never as typeof eg;
//@ts-ignore
//@ts-expect-error
shape = x.shape;
}