[英]Setting rules 'max-classes-per-file' in my angular project. Error trigger by ESLint is '"File has too many classes"
A bit new to linting, I'm trying to set a global rule "max-classes-per-file" in eslintrc.json
file to turn off eslint error "File has to many classes".对 linting 有点陌生,我正在尝试在
eslintrc.json
文件中设置全局规则“max-classes-per-file”以关闭 eslint 错误“文件有很多类”。 Trying to define the rule directly in the file works fine, but I'm really trying to set it globally.尝试直接在文件中定义规则工作正常,但我真的想全局设置它。
I might be defining that rules incorrectly because it does not impact my file.我可能错误地定义了该规则,因为它不会影响我的文件。
My definition:我的定义:
...
rules: {
'max-classes-per-file': 'off',
}
Any help would be greatly appreciated.任何帮助将不胜感激。
Thank you in advance.先感谢您。
Mea culpa, I simply didn't pay attention.过失,我根本没有注意。 After closing the file and reopening it, the linting rule applied accordingly
关闭文件并重新打开它后,linting 规则相应地应用
error in "
instead of '
and false
instead of off
在
"
而不是'
和false
而不是off
中出现错误
"rules": {
"max-classes-per-file": false
},
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.