-
-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurations in upper folders are always ignored #355
Comments
Thank you for this issue. Sounds good to me. We have For now, please use |
The only problem with specifying |
If you mean specifying Say, I have these settings:
and in var a
console.log('hi') When After commenting out So, I would say specifying Hope these make things clear. |
Yep, it works as long as you don't have an eslint config in a directory upwards from you project root (i.e. in your home directory).
|
I setup a repository. There are two folders: And only ~/p/eslint-test (master) $ eslint --print-config root-true/b/foo.js
{
"globals": {},
"env": {},
"rules": {
"semi": [
"error",
"never"
]
},
"parserOptions": {},
"root": false
}
~/p/eslint-test (master) $ eslint --print-config root-false/b/foo.js
{
"globals": {},
"env": {},
"rules": {
"no-unused-vars": [
"error"
],
"semi": [
"error",
"never"
]
},
"parserOptions": {},
"root": false
} Both report says But this starts to feel distracting anyway. I'd like to leave this issue with the original request of removing |
@redeyes2015 My intention was not to state it as a general problem and I think in 95% of the cases this won't matter.
Yes, perfectly fine as it will also resolve my concern :) |
+1, just ran into this based on a setup from the webpack vue template. Passing |
Tell us about your environment
Please show your full configuration:
Say, I have this setting: (modified from ESLint configuration cascading example)
And in (A), I set
In (B):
What did you do? Please include the actual source code causing the issue.
In foo.vue:
What did you expect to happen?
ESLint should report error about "Missing semicolon"
What actually happened? Please include the actual, raw output from ESLint.
ESLint considered everything fine and output nothing.
I traced the flow of ESLint, and found that the
root: true
inconfig/base.js
which comes from update-lib-config.js resulting the very config file including "pulgin: vue" would be consideredroot
and thus making ESLint ignore any config file in upper directories. In my example, the config ofsemi: always
is ignored.Because we are adopting Vue gragually, we want this kind of configuration. A
root: false
in (B) could work, but I thinkroot: true
should be used in the project config file, since providing it from a ESLint plugin only causes confusion. (Maybe ESLint should block this?)I did search through the issues and did not find reports about this, but if I just missed it, please accept my apology, and close this issue.
The text was updated successfully, but these errors were encountered: