Skip to content

Add tests with espree v9 #1622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/user-guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,10 @@ See also: "[How to use a custom parser?](#how-to-use-a-custom-parser)" section.
]
```

2. Make sure your tool is set to lint `.vue` files.
- CLI targets only `.js` files by default. You have to specify additional extensions with the `--ext` option or glob patterns. E.g. `eslint "src/**/*.{js,vue}"` or `eslint src --ext .vue`. If you use `@vue/cli-plugin-eslint` and the `vue-cli-service lint` command - you don't have to worry about it.
- If you are having issues with configuring editor, please read [editor integrations](#editor-integrations)
1. Make sure your tool is set to lint `.vue` files.

- CLI targets only `.js` files by default. You have to specify additional extensions with the `--ext` option or glob patterns. E.g. `eslint "src/**/*.{js,vue}"` or `eslint src --ext .vue`. If you use `@vue/cli-plugin-eslint` and the `vue-cli-service lint` command - you don't have to worry about it.
- If you are having issues with configuring editor, please read [editor integrations](#editor-integrations)

### Conflict with [Prettier]

Expand Down Expand Up @@ -384,8 +385,8 @@ See also [ESLint - Specifying Globals > Using configuration files](https://eslin
##### Using ESLint <= v7.x

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.
However, `espree` v8+ can understand the syntax of ES2022 and parse the Top Level `await`.
You install `espree` v8+ and specify `"espree"` and ES2022 in your configuration, the parser will be able to parse it.
However, `espree` >= v8 can understand the syntax of ES2022 and parse the Top Level `await`.
You install `espree` >= v8 and specify `"espree"` and ES2022 in your configuration, the parser will be able to parse it.

```js
module.exports = {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"@types/semver": "^7.2.0",
"@typescript-eslint/parser": "^5.0.0-0",
"@vuepress/plugin-pwa": "^1.4.1",
"acorn": "^8.5.0",
"env-cmd": "^10.1.0",
"eslint": "^7.0.0",
"eslint-config-prettier": "^6.11.0",
Expand All @@ -74,7 +75,7 @@
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "file:.",
"eslint4b": "^7.0.0",
"espree": "^8.0.0",
"espree": "^9.0.0",
"lodash": "^4.17.15",
"mocha": "^7.1.2",
"nyc": "^15.0.1",
Expand Down
8 changes: 8 additions & 0 deletions tests/fixtures/script-indent/static-block-01.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!--{}-->
<script>
class Foo {
static {
processFn()
}
}
</script>