Skip to content

Commit 2e73b8f

Browse files
committed
update doc
1 parent fe620ba commit 2e73b8f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/user-guide/README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -361,20 +361,22 @@ module.exports = {
361361

362362
##### Using ESLint <= v7.x
363363

364-
The parser `espree` that comes with `ESLint` doesn't understand the syntax of ES2022, so it can't parse Top Level `await` either.
365-
However, the `vue-eslint-parser` used by `eslint-plugin-vue` can use `espree` v8, which understands ES2022 by configuration.
364+
The parser `espree` that comes with `ESLint` v7.x doesn't understand the syntax of ES2022, so it can't parse the Top Level `await` either.
365+
However, `espree` v8+ can understand the syntax of ES2022 and parse the Top Level `await`.
366+
You install `espree` v8+ and specify `"espree"` and ES2022 in your configuration, the parser will be able to parse it.
366367

367368
```js
368369
module.exports = {
369370
parser: 'vue-eslint-parser',
370371
parserOptions: {
371-
ecmaVersion: 2022, // If you specify 2022, espree >= v8.x will be used automatically.
372+
parser: 'espree', // <-
373+
ecmaVersion: 2022, // <-
372374
sourceType: 'module'
373375
},
374376
}
375377
```
376378

377-
However, note that the AST generated by `espree` v8 may not work well with some rules of `ESLint` v7.
379+
However, note that the AST generated by `espree` v8+ may not work well with some rules of `ESLint` v7.x.
378380

379381
<!--
380382
##### Using ESLint >= v8.x

0 commit comments

Comments
 (0)