typescript - tslint 的空白规则的配置选项
问题描述
有没有办法配置tslint
在通常情况下期望空格,但在check-module
(例如:导入)情况下特别警告空格。我们有一些不一致之处,因为不同的工具以不同的间距生成/复制。
import {ComponentFixture} from "@angular/core/testing";
import { DebugElement } from "@angular/core"; // <-- Based on what I want to configure, this should generate white-space warning
我不确定这是否足够清楚,如果有意义的话,让我尝试用 config 展示这个想法:
有没有这样的(tslint.config
):
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
"whitespace": [
false,
"check-module"
],
我确信我不是第一个面临这个问题的人。任何参考/提示都会有所帮助。
解决方案
推荐阅读
- angular - 如何创建简单的导航测试用例 - Karma Testing Angular
- python - Scrapy shell 不允许我打字
- android - 有时未在 imageview 中设置位图图像
- python - 如何使用 Python 在 CSV 中拆分字符串并删除不完整的行?
- haskell - 如何使用 wreq 为请求设置 HTTP 标头?
- javascript - 无法理解如何使用 API,有什么建议吗?
- jquery - Rails - 如何将 id 数组作为隐藏字段的参数传递?
- c# - onserverclick-event 不适用于 aspx.file 中的动态表
- android - 如何在另一个应用程序中提示自动填充?
- sql - 如何在postgres表中获取包含某些文本的随机行