import { BottomSheetKey, BottomSheetService } from "bottomSheet";
import { INavItem, NavHeight } from 'core/services/nav.service';
import { Configuration } from './app.configuration';
使用tslint.json
配置:
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {},
"rules": {
"quotemark": {
"options": [ true, "single", "avoid-escape" ],
"severity": "warning"
}
},
}
quotemark
规则被忽略。
应该在"bottomSheet"
处提供的代码段的第 1 行的quotemark
规则中报告警告。
这可能是一个更大的规则问题,但我只用quotemark
观察到它。
如果您使用带有严重性和选项的新配置格式,您不希望
第一个选项是true
。 如果将其从数组中删除,则规则
应该按预期工作。
上午 12.05.2017 18:07 schrieb“Jacob Robertson”通知@github.com:
错误报告
- TSLint 版本:5.2.0
- 打字稿版本:2.3.1
- 通过以下方式
grunt-tslint / Atom / Visual Studio / 等正在整理 TypeScript 代码
import { BottomSheetKey, BottomSheetService } from "bottomSheet"; import { INavItem, NavHeight } from 'core/services/nav.service'; import { Configuration } from './app.configuration';
使用 tslint.json 配置:
{
"defaultSeverity": "错误",
“扩展”:[
“ tslint:推荐”
],
"jsRules": {},
“规则”:{
“引号”:{
"options": [ true, "single", "avoid-escape" ],
“严重性”:“警告”
}
},
}实际行为
引号规则被忽略。
预期行为应该从第 1 行的引号规则报告警告
“bottomSheet”中提供的片段。
想法这可能是一个更大的规则问题,但我只观察到它
引号。—
您收到此消息是因为您订阅了此线程。
直接回复本邮件,在GitHub上查看
https://github.com/palantir/tslint/issues/2746 ,或静音线程
https://github.com/notifications/unsubscribe-auth/ALaeKN8MtJyisZmnL1SJfgTyAIcaUQPJks5r5IOlgaJpZM4NZfAU
.
是的,这有效。 谢谢!
我在文档中找不到一个很好的例子来说明如何从
"rules": {
"quotemark": [ true, "single", "avoid-escape" ],
}
到
"rules": {
"quotemark": {
"options": [ "single", "avoid-escape" ],
"severity": "warning"
}
}
有没有在任何地方提到这种细微的差异?
@jacob-robertson 是的,它位于5.0.0 发行说明和变更日志的显着特性和增强部分。
最有用的评论
如果您使用带有严重性和选项的新配置格式,您不希望
第一个选项是
true
。 如果将其从数组中删除,则规则应该按预期工作。
上午 12.05.2017 18:07 schrieb“Jacob Robertson”通知@github.com: