Tlm*_*aK0 5 typescript tsc eslint tsserver
视觉代码(tsserver)发出一些建议,例如'await' has no effect on the type of this expression ts(80007)
但我没有找到解决此错误的方法,tsc也没有eslint找到在 CI 环境中使用它的方法
最后我找到了一条typescript-eslint规则https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/await-thenable.md
所以将其添加到 .eslintrc 就足够了:
"@typescript-eslint/await-thenable": "error"
| 归档时间: |
|
| 查看次数: |
423 次 |
| 最近记录: |