如果注释以4斜杠开头,我想在tslint中启用没有空格的注释。
规则:https://palantir.github.io/tslint/rules/comment-format/
我试过了
"comment-format": [true, "check-space", { "ignore-pattern": "//" }],
但它没有帮助。
从文档:
可以使用可作为最后一个参数传递的对象来管理
"check-lowercase"
或"check-uppercase"
的例外。
似乎无法将忽略的模式附加到"check-space"
。
将下一个规则添加到tslint.json:
"comment-format": [false, "check-space"]