-
-
Notifications
You must be signed in to change notification settings - Fork 688
Closed
Description
The problem you want to solve.
Currently, the docs recommend passing the .vue
extension in via CLI: https://eslint.vuejs.org/user-guide/#usage
This is cumbersome to declare for each config because Vue SFCs are always in .vue
files.
Your take on the correct solution to problem.
When an extension/pattern is set via overrides
, the extension no longer needs to be manually passed into ESLint via the --ext
flag.
I would like to recommend that configs use overrides
so ESLint can automatically detect .vue
files without the user needing to pass it in:
{
"overrides": [
{
"files": "*.vue",
// ...
}
]
}
Other info
- Applying the plugin rules specifically to
.vue
extensions should make it easier to handle conflicts like this:This rule only checks `.vue` files and does not interfere with other `.js` files. Unfortunately the default `indent` rule when turned on will try to lint both, so in order to make them complementary you can use `overrides` setting and disable `indent` rule on `.vue` files: