allegro / allegro/typescript-strict-plugin

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

Open
#21 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
397
Forks
34
PR merge metrics
PR metrics pending

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.