Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional message after @ts-expect-error #460

Open
jozef-mikusinec-kiwicom opened this issue Aug 16, 2023 · 3 comments
Open

Optional message after @ts-expect-error #460

jozef-mikusinec-kiwicom opened this issue Aug 16, 2023 · 3 comments

Comments

@jozef-mikusinec-kiwicom
Copy link

jozef-mikusinec-kiwicom commented Aug 16, 2023

Hi!

I think it would be useful if I could do something like:

npx suppress-ts-errors --message="Flow to TS migration."

and get comments like these:

// @ts-expect-error: Flow to TS migration.

// @ts-expect-error TS7016: Flow to TS migration.
@kopach
Copy link

kopach commented Jan 14, 2025

There is a great tool of similar kind, which can be used as inspiration here https://github.com/privatenumber/eslint-plugin-fix-later?tab=readme-ov-file#insertdisablecomment
It allows you to add message as well as insert codeowner in the comment, which is IMO great to delegate this fix
Also, there is an option to where to put to commend, after disable command or above

@jozef-mikusinec-kiwicom
Copy link
Author

@kopach That looks great, but unfortunately it looks like that tool only works for ESLint errors, there is no mention of suppressing TypeScript errors

@kopach
Copy link

kopach commented Jan 14, 2025

Yes, I've just referenced it here for implementation inspiration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants