Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 118ef57

Browse filesBrowse files
committed
Drop support for old versions of ESLint and Node.js (#2669)
1 parent 1606bae commit 118ef57
Copy full SHA for 118ef57

File tree

7 files changed

+28
-234
lines changed
Filter options

7 files changed

+28
-234
lines changed

‎.circleci/config.yml

Copy file name to clipboardExpand all lines: .circleci/config.yml
-142Lines changed: 0 additions & 142 deletions
This file was deleted.

‎.github/workflows/CI.yml

Copy file name to clipboardExpand all lines: .github/workflows/CI.yml
+15-34Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222
- name: Install Node.js
23-
uses: actions/setup-node@v3
23+
uses: actions/setup-node@v4
2424
- name: Install Packages
2525
run: npm install --legacy-peer-deps
2626
- name: Lint
@@ -30,58 +30,39 @@ jobs:
3030
name: Test
3131
strategy:
3232
matrix:
33-
node: [18, 20]
34-
eslint: [8, 9]
33+
node: [18, 20, 21, 'lts/*']
34+
eslint: [9]
3535
include:
36-
# On old Node version
37-
- node: 17
36+
# On old ESLint version
37+
- node: 18
3838
eslint: 8
3939

4040
runs-on: ubuntu-latest
4141
steps:
4242
- name: Checkout
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4444
- name: Install Node.js v${{ matrix.node }}
45-
uses: actions/setup-node@v3
45+
uses: actions/setup-node@v4
4646
with:
4747
node-version: ${{ matrix.node }}
4848
- name: Install Packages
49-
run: npm install --legacy-peer-deps
49+
run: npm install -f
5050
- name: Install ESLint v${{ matrix.eslint }}
51-
run: npm install --save-dev eslint@${{ matrix.eslint }} --legacy-peer-deps
52-
- name: Test
53-
run: npm test
54-
55-
test-for-ts-eslint-v5:
56-
name: Test
57-
runs-on: ubuntu-latest
58-
steps:
59-
- name: Checkout
60-
uses: actions/checkout@v3
61-
- name: Install Node.js
62-
uses: actions/setup-node@v3
63-
with:
64-
node-version: 18
65-
- name: Install Packages
66-
run: npm install --legacy-peer-deps
67-
- name: Install typescript-eslint v5
68-
run: npm install -D @typescript-eslint/parser
51+
run: npm install --save-dev eslint@${{ matrix.eslint }} -f
6952
- name: Test
7053
run: npm test
7154

72-
test-for-eslint-v8-without-eslint-stylistic:
73-
name: Test
55+
test-without-eslint-stylistic:
56+
name: Test without ESLint Stylistic
7457
runs-on: ubuntu-latest
7558
steps:
7659
- name: Checkout
77-
uses: actions/checkout@v3
60+
uses: actions/checkout@v4
7861
- name: Install Node.js
79-
uses: actions/setup-node@v3
62+
uses: actions/setup-node@v4
8063
- name: Install Packages
81-
run: npm install --legacy-peer-deps
64+
run: npm install -f
8265
- name: Uninstall @stylistic/eslint-plugin
8366
run: npm uninstall -D @stylistic/eslint-plugin
84-
- name: Install eslint v8
85-
run: npm install -D eslint@8
8667
- name: Test
8768
run: npm test

‎.github/workflows/check-for-resources-update.yml

Copy file name to clipboardExpand all lines: .github/workflows/check-for-resources-update.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
- name: Install Node.js
18-
uses: actions/setup-node@v3
18+
uses: actions/setup-node@v4
1919
with:
2020
node-version: 18
2121
- name: Install Packages

‎docs/user-guide/index.md

Copy file name to clipboardExpand all lines: docs/user-guide/index.md
+2-43Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ yarn add -D eslint eslint-plugin-vue
1616

1717
::: tip Requirements
1818

19-
- ESLint v6.2.0 and above
20-
- Node.js v14.17.x, v16.x and above
19+
- ESLint: `^8.57.0 || ^9.0.0`
20+
- Node.js: `^18.18.0 || ^20.9.0 || >=21.1.0`
2121

2222
:::
2323

@@ -479,47 +479,6 @@ You need to use [vue-eslint-parser] v9.0.0 or later.
479479

480480
Previously you had to use the `vue/setup-compiler-macros` environment, this is no longer needed.
481481

482-
#### Parsing error with Top Level `await`
483-
484-
##### Using ESLint <= v7.x
485-
486-
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.
487-
However, `espree` >= v8 can understand the syntax of ES2022 and parse the Top Level `await`.
488-
You install `espree` >= v8 and specify `"espree"` and ES2022 in your configuration, the parser will be able to parse it.
489-
490-
```js
491-
module.exports = {
492-
parser: 'vue-eslint-parser',
493-
parserOptions: {
494-
parser: 'espree', // <-
495-
ecmaVersion: 2022, // <-
496-
sourceType: 'module'
497-
},
498-
}
499-
```
500-
501-
However, note that the AST generated by `espree` v8+ may not work well with some rules of `ESLint` v7.x.
502-
503-
##### Using ESLint >= v8.x
504-
505-
You need to specify `2022` or `"latest"` for `parserOptions.ecmaVersion`.
506-
507-
```js
508-
module.exports = {
509-
parserOptions: {
510-
ecmaVersion: 'latest',
511-
sourceType: 'module'
512-
},
513-
}
514-
```
515-
516-
#### Other Problems
517-
518-
Try searching for existing issues.
519-
If it does not exist, you should open a new issue and share your repository to reproduce the issue.
520-
521-
[vue-eslint-parser]: https://github.com/vuejs/vue-eslint-parser
522-
523482
### Auto Imports Support
524483

525484
In [Nuxt 3](https://nuxt.com/) or with [`unplugin-auto-import`](https://github.com/unplugin/unplugin-auto-import), Vue APIs can be auto imported. To make rules like [`vue/no-ref-as-operand`](/rules/no-ref-as-operand.html) or [`vue/no-watch-after-await`](/rules/no-watch-after-await.html) work correctly with them, you can specify them in ESLint's [`globals`](https://eslint.org/docs/latest/use/configure/configuration-files-new#configuring-global-variables) options:

‎lib/configs/base.js

Copy file name to clipboardExpand all lines: lib/configs/base.js
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33
* This file has been automatically generated,
44
* in order to update its content execute "npm run update"
55
*/
6+
const globals = require('globals')
67
module.exports = {
78
parserOptions: {
8-
ecmaVersion: 2020,
9+
ecmaVersion: 'latest',
910
sourceType: 'module'
1011
},
11-
env: {
12-
browser: true,
13-
es6: true
14-
},
12+
globals: globals.browser,
1513
plugins: ['vue'],
1614
rules: {
1715
'vue/comment-directive': 'error',

‎package.json

Copy file name to clipboardExpand all lines: package.json
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@
5151
"url": "https://github.com/vuejs/eslint-plugin-vue/issues"
5252
},
5353
"engines": {
54-
"node": "^14.17.0 || >=16.0.0"
54+
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
5555
},
5656
"peerDependencies": {
57-
"eslint": "^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
57+
"eslint": "^8.57.0 || ^9.0.0",
5858
"vue-eslint-parser": "^9.4.3"
5959
},
6060
"dependencies": {
6161
"@eslint-community/eslint-utils": "^4.4.0",
62-
"globals": "^13.24.0",
62+
"globals": "^15.14.0",
6363
"natural-compare": "^1.4.0",
6464
"nth-check": "^2.1.1",
6565
"postcss-selector-parser": "^6.0.15",

‎tools/update-lib-configs.js

Copy file name to clipboardExpand all lines: tools/update-lib-configs.js
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,13 @@ function formatCategory(category) {
5555
* This file has been automatically generated,
5656
* in order to update its content execute "npm run update"
5757
*/
58+
const globals = require('globals')
5859
module.exports = {
5960
parserOptions: {
60-
ecmaVersion: 2020,
61+
ecmaVersion: 'latest',
6162
sourceType: 'module'
6263
},
63-
env: {
64-
browser: true,
65-
es6: true
66-
},
64+
globals: globals.browser,
6765
plugins: [
6866
'vue'
6967
],

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.