Skip to content

feat: add option to prefix files with "// @ts-nocheck"#143

Closed
RobCubed wants to merge 1 commit intovaltyr:mainfrom
RobCubed:main
Closed

feat: add option to prefix files with "// @ts-nocheck"#143
RobCubed wants to merge 1 commit intovaltyr:mainfrom
RobCubed:main

Conversation

@RobCubed
Copy link

Just a config option to do as the titles says, providing an escape hatch for odd scenarios where the code is correct but TS complains.

The use case we have is that at my job we have noUnusedLocals enabled and a Prisma enum that isn't used in the DB, but is used in other code. Due to all the enums being imported at the beginning, this causes tsc to complain. I'm sure there are more weird edge cases that this will allow people to dodge as well :)

@RobCubed RobCubed requested review from alii and valtyr as code owners October 16, 2025 21:43
@alii
Copy link
Collaborator

alii commented Jan 8, 2026

Thank you for this contribution. Unfortunately, I'm hesitant to add a change like this, since additional options increases complexity for the developer.

There is also a competing pull request (#140) which implements a new option for "additional text" at the top of the file. This is a broader solution that feels more correct, since, for example, users may want to add eslint ignores as well as ts-nocheck, etc.

@alii alii closed this Jan 8, 2026
@RobCubed
Copy link
Author

Thank you for this contribution. Unfortunately, I'm hesitant to add a change like this, since additional options increases complexity for the developer.

There is also a competing pull request (#140) which implements a new option for "additional text" at the top of the file. This is a broader solution that feels more correct, since, for example, users may want to add eslint ignores as well as ts-nocheck, etc.

Works for me - not sure how I didn't miss #140 when making this. Thank you for the update, hopefully it gets merged soon!

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

Successfully merging this pull request may close these issues.

2 participants