我已经在我的Angular 包中应用了Angular -eslint.我还添加了更漂亮的配置. 更漂亮的是将单引号改为&;QUOTE;符号.
我怎么才能解决这个问题呢?
Lint之前的代码:
<div
[id]="field?.tempId"
style="width: 100%; height: '400px'"
></div>
LINT后的代码
style="width: 100%; height: "400px""
我已try 更改html文件的解析器. 目前,它的 struct 如下
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended",
"prettier"
],
"rules": {
"@angular-eslint/template/eqeqeq": ["off"],
"@angular-eslint/template/banana-in-box" : [ "error" ],
"@angular-eslint/template/no-negated-async": ["off"]
},
"parserOptions": {
"project": [
"tsconfig.json"
],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {
"max-len": ["error", { "code": 140 }]
}
}
}