Skip to content

Commit 15bf2db

Browse files
committed
update doc
1 parent 527f438 commit 15bf2db

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
@@ -359,20 +359,22 @@ module.exports = {
359359

360360
##### Using ESLint <= v7.x
361361

362-
The parser `espree` that comes with `ESLint` doesn't understand the syntax of ES2022, so it can't parse Top Level `await` either.
363-
However, the `vue-eslint-parser` used by `eslint-plugin-vue` can use `espree` v8, which understands ES2022 by configuration.
362+
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.
363+
However, `espree` v8+ can understand the syntax of ES2022 and parse the Top Level `await`.
364+
You install `espree` v8+ and specify `"espree"` and ES2022 in your configuration, the parser will be able to parse it.
364365

365366
```js
366367
module.exports = {
367368
parser: 'vue-eslint-parser',
368369
parserOptions: {
369-
ecmaVersion: 2022, // If you specify 2022, espree >= v8.x will be used automatically.
370+
parser: 'espree', // <-
371+
ecmaVersion: 2022, // <-
370372
sourceType: 'module'
371373
},
372374
}
373375
```
374376

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

377379
<!--
378380
##### Using ESLint >= v8.x

0 commit comments

Comments
 (0)