【问题标题】:tslint doesn't work in the latest Angular versiontslint 在最新的 Angular 版本中不起作用
【发布时间】:2023-03-13 21:27:02
【问题描述】:

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

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

我在 app.component.ts 文件中添加了以下代码:

constructor() {
    this.sayHey("Hey")
}

sayHey(message: any): any {
    console.log(message);
}

如您所见,我在任何地方都使用any,但我的 vs 代码中没有显示错误。

【问题讨论】:

    标签: angular eslint tslint


    【解决方案1】:

    已通过安装以下扩展程序修复:
    https://github.com/Microsoft/vscode-typescript-tslint-plugin

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-26
      • 2016-10-05
      • 1970-01-01
      • 2022-07-20
      • 1970-01-01
      • 2021-05-08
      相关资源
      最近更新 更多