tslint在最新的Angular版本中不起作用

问题描述

我正在使用 Angular 10 (最新版本)和 tslint 6.1.0
我在 tslint.json 文件的rules对象中添加了以下规则:

Vue

然后我将以下代码添加到app.component.ts文件中:

"no-any": [true,{ "ignore-rest-args": true }]

您可以看到我到处都在使用constructor() { this.sayHey("Hey") } sayHey(message: any): any { console.log(message); } ,但是vs代码中没有显示错误。

解决方法

通过安装以下扩展模块进行修复:
https://github.com/Microsoft/vscode-typescript-tslint-plugin

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...