Skip to content

Instantly share code, notes, and snippets.

View shimingw's full-sized avatar
🎯
Focusing

shimingw

🎯
Focusing
View GitHub Profile
@zorji
zorji / auto-ts-ignore.ts
Last active March 20, 2025 18:37
A script to auto add // @ts-ignore to lines with TypeScript compilation error
/**
* A script to auto add // @ts-ignore to lines with TypeScript compilation error
* This could be useful when you are upgrading your tsc version, or introduced new changes in tsconfig or just converting JS codebase to TS.
* Example usage:
* $ npx tsc > compilation-errors.log
* $ npx ts-node auto-ts-ignore.ts compilation-errors.log
*/
import { readFile, writeFile } from 'fs/promises'