{"id":13554781,"url":"https://github.com/kawamataryo/suppress-ts-errors","last_synced_at":"2025-04-13T04:16:46.175Z","repository":{"id":37047027,"uuid":"487217232","full_name":"kawamataryo/suppress-ts-errors","owner":"kawamataryo","description":"CLI tool to add @ts-expect-errors to typescript type errors","archived":false,"fork":false,"pushed_at":"2025-04-11T22:45:50.000Z","size":1679,"stargazers_count":133,"open_issues_count":12,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T04:16:30.190Z","etag":null,"topics":["cli","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/suppress-ts-errors","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kawamataryo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-30T07:56:39.000Z","updated_at":"2025-04-11T22:45:10.000Z","dependencies_parsed_at":"2023-12-25T05:25:01.910Z","dependency_job_id":"dc21c52d-8935-45f5-a146-bf1d55038f7d","html_url":"https://github.com/kawamataryo/suppress-ts-errors","commit_stats":{"total_commits":394,"total_committers":4,"mean_commits":98.5,"dds":"0.41370558375634514","last_synced_commit":"d26a6e59671dbe6dc9235818db09a4a3429d0232"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kawamataryo%2Fsuppress-ts-errors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kawamataryo%2Fsuppress-ts-errors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kawamataryo%2Fsuppress-ts-errors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kawamataryo%2Fsuppress-ts-errors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kawamataryo","download_url":"https://codeload.github.com/kawamataryo/suppress-ts-errors/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248661715,"owners_count":21141451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","nodejs","typescript"],"created_at":"2024-08-01T12:02:54.745Z","updated_at":"2025-04-13T04:16:46.137Z","avatar_url":"https://github.com/kawamataryo.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# suppress-ts-errors\n\n[![CI](https://github.com/kawamataryo/suppress-ts-errors/actions/workflows/ci.yml/badge.svg)](https://github.com/kawamataryo/suppress-ts-errors/actions/workflows/ci.yml)\n\u003ca href=\"https://npmcharts.com/compare/suppress-ts-errors?minimal=true\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/suppress-ts-errors.svg\" alt=\"Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/suppress-ts-errors\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/suppress-ts-errors.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/suppress-ts-errors\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/suppress-ts-errors.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/kawamataryo/suppress-ts-errors\" target=\"__blank\"\u003e\u003cimg alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/kawamataryo/suppress-ts-errors?style=social\"\u003e\u003c/a\u003e\n\nCli tool to add comments to suppress typescript type errors.  \nAdd [@ts-expect-error](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#-ts-expect-error-comments) or [@ts-ignore](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-6.html#suppress-errors-in-ts-files-using--ts-ignore-comments) comments to all locations where errors are occurring.  \nSupport for `.ts`, `.tsx`, `.vue`.\n\n![Kapture 2022-05-01 at 15 35 50](https://user-images.githubusercontent.com/11070996/166135217-82e23b1e-7c9f-40c3-88ad-985b021b842a.gif)\n\n## 🚀 Usage\n\n### Running scripts to `.ts` and `.tsx`\n\nRun the script in the directory where `tsconfig.json` is located.\n\n```bash\n$ npx suppress-ts-errors\n```\n\n### Running scripts to `.vue`\n\nWhen targeting vue sfc, the path of the vue component must be specified with the glob pattern.  \n**Notice:** It does not support commenting out type errors in the `\u003ctemplate\u003e` section of vue, only the `\u003cscript\u003e` section.\n\n```bash\n$ npx suppress-ts-errors vue src/**/*.vue\n```\n\n### options\n\n| option              | default           | description                                                                                                                                                                                                                                                                                                                           |\n| ------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| -t, --tsconfig-path | `./tsconfig.json` | Path to tsconfig.json.                                                                                                                                                                                                                                                                                                                |\n| -c, --comment-type  | `1`               | Choice of inserted comment type. \u003cbr\u003e `1` is [@ts-expect-error](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#-ts-expect-error-comments), `2` is [@ts-ignore](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-6.html#suppress-errors-in-ts-files-using--ts-ignore-comments). |\n| -e, --error-code    | `true`            | Add error code to comment. e.g. TS2345.                                                                                                                                                                                                                                                                                               |\n| -g, --glob          | `undefined`       | Add a specific glob for error suppression (prevents script from processing all files and their dependencies)                                                                                                                                                                                                                          |\n| -m, --message       | `undefined`       | Add a custom message to the comment.                                                                                                                                                                                                                                                                                                    |\n\n## ✨ Contributing\n\nContributions are welcome 🎉  \nWe accept contributions via Pull Requests. See [this guide](https://github.com/kawamataryo/suppress-ts-errors/blob/main/CONTRIBUTING.md) on how to make a contribution.\n\n## 📄 License\n\nsuppress-ts-errors is available under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkawamataryo%2Fsuppress-ts-errors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkawamataryo%2Fsuppress-ts-errors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkawamataryo%2Fsuppress-ts-errors/lists"}