kawamataryo/suppress-ts-errors

CLI tool to add @ts-expect-errors to typescript type errors

TypeScript

157

961 commits

updated Oct 13, 2026

See the code

README

suppress-ts-errors

CI Downloads Version License GitHub stars

Cli tool to add comments to suppress typescript type errors.
Add @ts-expect-error or @ts-ignore comments to all locations where errors are occurring.
Support for .ts, .tsx, .vue.

Kapture 2022-05-01 at 15 35 50

πŸš€ Usage

Running scripts to .ts and .tsx

Run the script in the directory where tsconfig.json is located.

$ npx suppress-ts-errors

Running scripts to .vue

When targeting vue sfc, the path of the vue component must be specified with the glob pattern.
Notice: It does not support commenting out type errors in the <template> section of vue, only the <script> section.

$ npx suppress-ts-errors vue src/**/*.vue

options

optiondefaultdescription
-t, --tsconfig-path./tsconfig.jsonPath to tsconfig.json.
-c, --comment-type1Choice of inserted comment type.
1 is @ts-expect-error, 2 is @ts-ignore.
-e, --error-codetrueAdd error code to comment. e.g. TS2345.
-g, --globundefinedAdd a specific glob for error suppression (prevents script from processing all files and their dependencies)
-m, --messageundefinedAdd a custom message to the comment.

✨ Contributing

Contributions are welcome πŸŽ‰
We accept contributions via Pull Requests. See this guide on how to make a contribution.

πŸ“„ License

suppress-ts-errors is available under the MIT License.

cli
nodejs
typescript

kawamataryo/suppress-ts-errors

CLI tool to add @ts-expect-errors to typescript type errors

TypeScript

157

961 commits

updated Oct 13, 2026

See the code

README

suppress-ts-errors

CI Downloads Version License GitHub stars

Cli tool to add comments to suppress typescript type errors.
Add @ts-expect-error or @ts-ignore comments to all locations where errors are occurring.
Support for .ts, .tsx, .vue.

Kapture 2022-05-01 at 15 35 50

πŸš€ Usage

Running scripts to .ts and .tsx

Run the script in the directory where tsconfig.json is located.

$ npx suppress-ts-errors

Running scripts to .vue

When targeting vue sfc, the path of the vue component must be specified with the glob pattern.
Notice: It does not support commenting out type errors in the <template> section of vue, only the <script> section.

$ npx suppress-ts-errors vue src/**/*.vue

options

optiondefaultdescription
-t, --tsconfig-path./tsconfig.jsonPath to tsconfig.json.
-c, --comment-type1Choice of inserted comment type.
1 is @ts-expect-error, 2 is @ts-ignore.
-e, --error-codetrueAdd error code to comment. e.g. TS2345.
-g, --globundefinedAdd a specific glob for error suppression (prevents script from processing all files and their dependencies)
-m, --messageundefinedAdd a custom message to the comment.

✨ Contributing

Contributions are welcome πŸŽ‰
We accept contributions via Pull Requests. See this guide on how to make a contribution.

πŸ“„ License

suppress-ts-errors is available under the MIT License.

cli
nodejs
typescript

Project health

Latest release

1.5.1 Β· Feb 11, 2025

Releases this year

0

Significant stargazers

Mohsen Azimi

573 followers Β· starred Mar 2025

ocavue

290 followers Β· starred Dec 2024

Ryan Albrecht

122 followers Β· starred Aug 2023

ncaq

176 followers Β· starred Feb 2023