如果我使用plugin:prettier/recommended
exlintrc.json ng lint 会无限。
.eslintrc.json
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:prettier/recommended"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
// "prefix": "app",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
// "prefix": "app",
"style": "camelCase",
"type": "attribute"
}
],
"@angular-eslint/no-host-metadata-property": "off",
"@angular-eslint/no-output-on-prefix": "off",
"@angular-eslint/no-output-native":"off",
"@angular-eslint/no-input-rename": "off"
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {
"@angular-eslint/template/eqeqeq": "off"
}
}
]
}
在同一个根目录下,我有 .prettierrc 文件,其配置如下
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 70
}
当我运行ng lint
构建无限。如果我不使用"plugin:prettier/recommended"
lint 作品