feat: add option to prefix files with "// @ts-nocheck"#143
feat: add option to prefix files with "// @ts-nocheck"#143RobCubed wants to merge 1 commit intovaltyr:mainfrom
Conversation
|
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! |
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
noUnusedLocalsenabled 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 causestscto complain. I'm sure there are more weird edge cases that this will allow people to dodge as well :)