angular2,文件应该以换行符和尾随空格结尾

标签 angular backticks

我是 angular2 和 typescript 的新手,我遇到了这 3 个错误,我不明白如何修复尾随空格和文件应该以换行符结尾。

enter image description here

最佳答案

错误来自 tslint,它为您的项目定义了一些规则,并检查您的代码是否符合这些规则。您需要修复错误或忽略/禁用这些规则。

file should end with a newline

You can ignore this rule on tslint.json by adding this on the rules object property

 "eofline": false

-

trailing whitespace

You can ignore this rule on tslint.json by adding this on the rules object property

 "no-trailing-whitespace": false

有关规则的更多信息:https://palantir.github.io/tslint/rules/

关于angular2,文件应该以换行符和尾随空格结尾,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40139566/

相关文章:

javascript - 使用 JSON 响应填充 Mat 表(并执行排序和过滤)

Markdown : writing inline dplyr code if column names have spaces defined with backticks

github - 如何在 Markdown 中将三个反引号渲染为内联代码块?

angular - 为什么我们应该在 Angular 单元测试中使用 Jasmine Spy 对象?

angular - RxJS 为 Angular2 提供了哪些功能?

angular - 它相当于 Blazor 中的 Angular/Vue 事件发射吗?

angular - 如何在 Dart 上的 Angular 2 中使用参数嵌套 2 个或更多路由级别

反引号命令中的 bash pipestatus?

macros - Defmacro 扩展为 defsetf

javascript - PhpStorm - ES6 模板字符串的反引号被破坏