allegro / allegro/typescript-strict-plugin

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

未关闭
#21 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
TypeScript
星标
397
派生
34
PR 合并指标
PR 指标待抓取

描述

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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。