Skip to content

Commit ce02cf2

Browse files
authored
feat: improve compatibility with eslint v10 (#531)
* feat: improve compatibility with eslint v10 * Create calm-tomatoes-nail.md * fix workflow * update workflow
1 parent 919c8e1 commit ce02cf2

File tree

3 files changed

+24
-25
lines changed

3 files changed

+24
-25
lines changed

.changeset/calm-tomatoes-nail.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-astro": minor
3+
---
4+
5+
feat: improve compatibility with eslint v10

.github/workflows/NodeCI.yml

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -54,37 +54,31 @@ jobs:
5454
run: npm test
5555
- name: Type Test
5656
run: npm run test:type
57-
# test-for-eslint-v10:
58-
# runs-on: ubuntu-latest
59-
# strategy:
60-
# matrix:
61-
# node-version: [20.x, 22.x, 24.x]
62-
# steps:
63-
# - uses: actions/checkout@v6
64-
# - name: Use Node.js ${{ matrix.node-version }}
65-
# uses: actions/setup-node@v6
66-
# with:
67-
# node-version: ${{ matrix.node-version }}
68-
# - name: Install eslint v10
69-
# run: |+
70-
# npm i -D eslint@10 -f
71-
# npx rimraf node_modules
72-
# - name: Install Packages
73-
# run: npm install -f
74-
# - name: Test
75-
# run: npm test
76-
# - name: Type Test
77-
# run: npm run test:type
57+
test-for-eslint-v10:
58+
runs-on: ubuntu-latest
59+
strategy:
60+
matrix:
61+
node-version: [20.x, 22.x, 24.x]
62+
steps:
63+
- uses: actions/checkout@v6
64+
- name: Use Node.js ${{ matrix.node-version }}
65+
uses: actions/setup-node@v6
66+
with:
67+
node-version: ${{ matrix.node-version }}
68+
- name: Install eslint v10
69+
run: npm pkg set devDependencies.eslint=^10
70+
- name: Install Packages
71+
run: npm install -f
72+
- name: Test
73+
run: npm test
7874
test-for-eslint-v8:
7975
runs-on: ubuntu-latest
8076
steps:
8177
- uses: actions/checkout@v6
8278
- name: Use Node.js ${{ matrix.node-version }}
8379
uses: actions/setup-node@v6
8480
- name: Install eslint v8.57.0
85-
run: |+
86-
npm i -D eslint@^8.57.0 -f
87-
npx rimraf node_modules
81+
run: npm pkg set devDependencies.eslint=^8.57.0
8882
- name: Install Packages
8983
run: npm install -f
9084
- name: Test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"@eslint-community/eslint-utils": "^4.2.0",
6969
"@jridgewell/sourcemap-codec": "^1.4.14",
7070
"@typescript-eslint/types": "^7.7.1 || ^8",
71-
"astro-eslint-parser": "^1.0.2",
71+
"astro-eslint-parser": "^1.3.0",
7272
"eslint-compat-utils": "^0.6.0",
7373
"globals": "^16.0.0",
7474
"postcss": "^8.4.14",

0 commit comments

Comments
 (0)