[英]ESLint - How to override extended file severity
ESLint - How to override extended file severity? ESLint-如何覆盖扩展文件的严重性? Example: I can't disable indent errors.
示例:我无法禁用缩进错误。 Base configuration:
基本配置:
"indent": [
"error",
"tab"
],
My eslintrc configuration: 我的eslintrc配置:
module.exports = {
extends: "./baseConfig.js",
rules: {
"indent": [
"warn",
"tab"
],
}
};
but I'm still getting errors for the indent rule. 但缩进规则仍然有错误。 I also tried:
我也尝试过:
rules: {
"indent": 0
}
but again got indent errors. 但是又出现了缩进错误。 what is wrong here?
这是怎么了
location of project at /git/projectX 项目在/ git / projectX的位置
structure: 结构体:
Project
index.js
package.json
eslintrc.js
baseConfig.js
You might just need to change eslintrc.js
to .eslintrc.js
. 你可能只需要改变
eslintrc.js
到.eslintrc.js
。
Also do you have an eslintConfig
field in package.json? 在package.json中还有
eslintConfig
字段吗? That could also interfere. 这也可能会干扰。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.