Skip to content

Commit 0db4f93

Browse files
mysticateamichalsnik
authored andcommitted
Docs: update README.md (#393)
* Docs: update README.md * fix grammer
1 parent ec5aac2 commit 0db4f93

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

README.md

+13-5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ You can try this plugin on the Web.
1515
## :grey_exclamation: Requirements
1616

1717
- [ESLint](http://eslint.org/) `>=3.18.0`.
18+
- `>=4.7.0` to use `eslint --fix`.
19+
- `>=4.14.0` to use with `babel-eslint`.
1820
- Node.js `>=4.0.0`
1921

2022
## :cd: Installation
@@ -235,14 +237,20 @@ If you already use other parser (e.g. `"parser": "babel-eslint"`), please move i
235237

236238
The `vue-eslint-parser` uses the parser which is set by `parserOptions.parser` to parse scripts.
237239

238-
### Can my javascript code have increased indentation?
240+
### Why doesn't it work on .vue file?
239241

240-
It depends on the version of eslint you're using.
242+
1. Make sure you don't have `eslint-plugin-html` in your config. The `eslint-plugin-html` extracts the content from `<script>` tags, but `eslint-vue-plugin` requires `<script>` tags and `<template>` tags in order to distinguish template and script in single file components.
241243

242-
[indent](https://eslint.org/docs/rules/indent) rule in `[email protected]` makes it possible, but if you use `[email protected]` be aware that this rule has been rewritten and is more strict now, thus it doesn't allow to have increased initial indentation.
244+
```diff
245+
"plugins": [
246+
"vue",
247+
- "html"
248+
]
249+
```
243250

244-
You can however use [indent-legacy](https://eslint.org/docs/rules/indent-legacy) rule instead.
245-
More informations [here](https://eslint.org/docs/user-guide/migrating-to-4.0.0#indent-rewrite).
251+
2. Make sure your tool is set to lint `.vue` files.
252+
- CLI targets only `.js` files by default. You have to specify additional extensions by `--ext` option or glob patterns. E.g. `eslint "src/**/*.{js,vue}"` or `eslint src --ext .vue`.
253+
- VSCode targets only JavaScript or HTML files by default. You have to add `{"autoFix": true, "language": "vue"}` into `eslint.validate` entry.
246254

247255
## :anchor: Semantic Versioning Policy
248256

0 commit comments

Comments
 (0)