Visual Code (tsserver) 发出一些建议,例如'await' has no effect on the type of this expression ts(80007)
但是我找不到解决此错误的方法,tsc
也找不到eslint
在 CI 环境中使用它的方法
Visual Code (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"