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

ts-expect-error always causes lint error in ts-strict files #21

Open
sudall opened this issue Jan 22, 2022 · 1 comment
Open

ts-expect-error always causes lint error in ts-strict files #21

sudall opened this issue Jan 22, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@sudall
Copy link

sudall commented Jan 22, 2022

I'm setting up build-time linting for a project (ie. tsc && tsc-strict) and noticed that ts-expect-error will always fail linting if the expected error is due to strict typing because tsc will think that there's no expected error (and say that the ts-expect-error should be removed) while tsc-strict will see the error. Any ideas for how to fix this? Perhaps tsc-strict could do the linting for all files or maybe there's a way to have tsc skip strict files?

For now, the best solution I can think of is to just use ts-ignore instead.

@kamkry
Copy link
Collaborator

kamkry commented Jan 24, 2022

Hi, currently tsc alone doesn't have any option to filter or select files from the CLI. In tsc-strict we filter errors produced by strict files in our code. What we could do in the future would be creating a script tsc-no-strict, which would run tsc and filter out every strict file.

@kamkry kamkry added the enhancement New feature or request label Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants