我在一个带有tsconfig.json
的目录中运行tslint -p .
,它有"strict": true
,但我得到了这个:
strict-type-predicates does not work without --strictNullChecks
我在 #2786 中看到它应该检查它。 我错过了什么吗?
例如,克隆https://github.com/cretz/awss/tree/05eb0c7adb22fb4feab92c1f190a752f8cfec921 , cd 到proj
,然后运行npm run lint
strict
是compilerOption
,它在 tsconfig.json 的顶层不正确。 它应该是这样的:
{
"compilerOptions": {
"strict": true
}
}
我的错误,谢谢!
最有用的评论
strict
是compilerOption
,它在 tsconfig.json 的顶层不正确。 它应该是这样的: