Angular Codelyzer不';t报告HTML/CSS文件中的错误

Angular Codelyzer不';t报告HTML/CSS文件中的错误,angular,angular-cli,codelyzer,Angular,Angular Cli,Codelyzer,我刚刚使用@angular/cli(最新版本-1.1.3)创建了一个新项目,我在codelyzer中遇到了一些问题 让我们看看我现在拥有的代码: 应用程序组件.ts import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export

我刚刚使用@angular/cli(最新版本-1.1.3)创建了一个新项目,我在codelyzer中遇到了一些问题

让我们看看我现在拥有的代码:

应用程序组件.ts

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {

  private title = 'app'; // Should warn here
}
app.component.css:

spam { // Intentionally wrong to warn errors
  color: red;
}
<h1>Welcome to {{title}}!!</h1>
app.component.html:

spam { // Intentionally wrong to warn errors
  color: red;
}
<h1>Welcome to {{title}}!!</h1>

运行后
ng lint

实际行为:

所有的文件都经过筛选

预期行为:

警告规则“模板使用公共”:

  • HTML中使用了一个私有变量
警告规则“没有未使用的css”:

  • CSS没有被使用
请注意,这些示例只是我尝试过的几个示例。事实上,codelyzer似乎没有监视或报告.css.html文件中的任何错误


我错过什么了吗?提前谢谢。

嘿,你找到解决办法了吗?我也有同样的问题-特别是,
模板使用公共
被公然忽略。与“Angular CLI:6.0.8”相同的问题,我无法让
ng lint
为我的html文件输出任何问题。