[英]TypeScript. TSLint does not wok in Types
所以我不明白如何在tslint.json
进行标准化和激活半规则检查选项。 因为到目前为止,它不会检查TypeScript中的Types
并且不会对Types
产生任何错误。 同样在Interfaces
它正常运转,当我使用其他东西时抛出错误;
,那么我也该如何为Types
它?...
export type IProps = {
active?: boolean, // no error
title?: string; // no error
text?: string // no error
}
tslint.json:
{
"defaultSeverity": "error",
"extends": [
"tslint-config-airbnb",
"tslint-eslint-rules",
"tslint-react"
],
"jsRules": {},
"rulesDirectory": [],
"rules": {
"arrow-parens": false,
"whitespace": [
false,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
}
}
您正在寻找type-literal-delimiter
规则 。 只需在tslint.json
其从false
更改为true
tslint.json
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.