Reputation: 13353
I have empty rules in my .eslintrc
file but I am still getting some error messages like "max-len
exceeding 120 characters."
{
"env": {
"es6": true,
"browser": true,
"node": true
},
"rules": {
},
"parser": "babel-eslint",
"plugins": [
"react"
],
"ecmaFeatures": {
"jsx": true
}
}
The documentation says that all rules are disabled by default. I wonder why I am still getting eslint errors without my defining any rules.
"max-len": 0
max-len
in my project.Are all rules disabled by default ? Where did I get the rules (e.g. max-len) from ?
Upvotes: 2
Views: 1290
Reputation: 11266
ESLint configurations cascade. So given a path to lint, ESLint will go up the directory structure to find config files until it either hits config with root:true
or root directory. All the config files that will be found are going to to be merged together. There's a chance that you might have another config file somewhere in your path. In order to test that, you can run ESLint with the --debug
flag, which will list all of the config files that are currently being used.
Upvotes: 4