-
-
Notifications
You must be signed in to change notification settings - Fork 695
Description
Tell us about your environment
- ESLint Version: 4.16.0
- eslint-plugin-vue Version: 4.2.0
- Node Version: 6.8.1
Please show your full configuration:
Say, I have this setting: (modified from ESLint configuration cascading example)
your-project
├── .eslintrc.yaml // (A)
└── app
├── source.js
└─┬ vue_components
├── .eslintrc.yaml // (B)
└─ foo.vue
And in (A), I set
root: true rules: semi: - error - always
In (B):
extends: - plugin:vue/essential
What did you do? Please include the actual source code causing the issue.
In foo.vue:
<script> console.log(hi) // no semi </script>
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 in config/base.js which comes from update-lib-config.js resulting the very config file including "pulgin: vue" would be considered root and thus making ESLint ignore any config file in upper directories. In my example, the config of semi: always is ignored.
Because we are adopting Vue gragually, we want this kind of configuration. A root: false in (B) could work, but I think root: 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.