简体   繁体   English

错误的背景或推理:TsLint:注释必须以小写字母开头

[英]Background or reasoning for error: TsLint: comment must start with lowercase letter

I'm getting the following TsLint message in my project: 我在我的项目中收到以下TsLint消息:

TsLint: comment must start with lowercase letter TsLint:注释必须以小写字母开头

Is there any grounding behind this? 这背后有什么基础吗? I agree with most of what I've come across in TsLint, and I'm aware of the ability to turn this warning off. 我同意我在TsLint中遇到的大部分内容,并且我知道能够关闭此警告。

I'd rather understand why they suggest this particular rule. 我宁愿理解为什么他们建议这个特殊的规则。 I read the docs at https://github.com/palantir/tslint#supported-rules which explain what the rule does but not why. 我在https://github.com/palantir/tslint#supported-rules上阅读了这些文档,它们解释了规则的作用但不解释原因。

I asked the author on this one. 问过这个问题的作者

This is just a style rule, and can safely be ignored if it's not needed 这只是一种样式规则,如果不需要,可以安全地忽略

Personally speaking, I can think of no reason to enforce this rule so I recommend disabling it or ignoring it. 就个人而言,我认为没有理由强制执行此规则,因此我建议禁用它或忽略它。

将此规则添加到tslint.json:

"comment-format": [false, "check-uppercase"]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM