Skip to content

Commit 6f35f1b

Browse files
fiskerJounQin
andauthored
chore(housekeeping): update ESLint to v9 (#709)
Co-authored-by: JounQin <[email protected]>
1 parent 9726349 commit 6f35f1b

File tree

13 files changed

+1838
-1638
lines changed

13 files changed

+1838
-1638
lines changed

.github/workflows/ci.yml

+20-4
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,29 @@ on:
66
- main
77
pull_request:
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
ci:
11-
name: Lint and Test on Node ${{ matrix.node-version }}
15+
name: Lint and Test on Node ${{ matrix.node-version }} (ESLint ${{ matrix.eslint-version }})
1216
runs-on: ubuntu-latest
1317
strategy:
18+
fail-fast: false
1419
matrix:
1520
node-version:
16-
- 14
17-
- 16
18-
- 18
21+
- 22
1922
- 20
23+
- 18
24+
eslint-version:
25+
- 9
26+
- 8
27+
include:
28+
- node-version: 16
29+
eslint-version: 8
30+
- node-version: 14
31+
eslint-version: 8
2032

2133
steps:
2234
- uses: actions/checkout@v4
@@ -32,6 +44,10 @@ jobs:
3244
- name: Install
3345
run: pnpm install
3446

47+
- name: Install ESLint ${{ matrix.node-version }}
48+
if: ${{ matrix.eslint-version != 9 }}
49+
run: pnpm install -D eslint@${{ matrix.eslint-version }} eslint-plugin-svelte@2 svelte@3
50+
3551
- name: Test
3652
run: pnpm mocha
3753

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
20

.remarkrc

-5
This file was deleted.

.remarkrc.mjs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import preset from '@1stg/remark-preset';
2+
3+
export default {
4+
plugins: [preset],
5+
};

eslint.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ module.exports = [
1313
eslintPluginMdx.flat,
1414
eslintPluginMdx.flatCodeBlocks,
1515
eslintPluginPrettierRecommended,
16+
{ files: ['**/*.mjs'], languageOptions: { sourceType: 'module' } },
1617
{
1718
rules: {
1819
'eslint-plugin/report-message-format': ['error', '^[^a-z].*\\.$'],

package.json

+11-13
Original file line numberDiff line numberDiff line change
@@ -67,45 +67,43 @@
6767
"synckit": "^0.9.1"
6868
},
6969
"devDependencies": {
70-
"@1stg/remark-preset": "^2.0.0",
70+
"@1stg/remark-preset": "^3.0.0",
7171
"@changesets/changelog-github": "^0.5.0",
7272
"@changesets/cli": "^2.27.1",
7373
"@commitlint/config-conventional": "^18.4.3",
7474
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
75-
"@eslint/js": "^8.56.0",
75+
"@eslint/js": "^9.21.0",
7676
"@graphql-eslint/eslint-plugin": "^3.20.1",
7777
"@html-eslint/parser": "^0.24.1",
7878
"@prettier/plugin-pug": "^3.0.0",
79-
"@types/eslint": "^8.56.0",
8079
"@types/prettier-linter-helpers": "^1.0.4",
8180
"commitlint": "^18.4.3",
82-
"eslint": "^8.56.0",
83-
"eslint-config-prettier": "^9.1.0",
81+
"eslint": "^9.21.0",
82+
"eslint-config-prettier": "^10.1.1",
8483
"eslint-formatter-friendly": "^7.0.0",
85-
"eslint-mdx": "^2.3.0",
84+
"eslint-mdx": "^3.1.5",
8685
"eslint-plugin-eslint-plugin": "^5.2.1",
87-
"eslint-plugin-mdx": "^2.3.0",
86+
"eslint-plugin-mdx": "^3.2.0",
8887
"eslint-plugin-n": "^16.5.0",
8988
"eslint-plugin-prettier": "link:.",
9089
"eslint-plugin-pug": "^1.2.5",
91-
"eslint-plugin-svelte": "^2.35.1",
92-
"eslint-plugin-svelte3": "^4.0.0",
90+
"eslint-plugin-svelte": "^3.0.2",
9391
"graphql": "^16.8.1",
9492
"lint-staged": "^15.2.0",
9593
"mocha": "^10.2.0",
96-
"prettier": "^3.1.1",
94+
"prettier": "^3.5.3",
9795
"prettier-plugin-pkg": "^0.18.0",
9896
"prettier-plugin-svelte": "^3.1.2",
9997
"simple-git-hooks": "^2.9.0",
100-
"svelte": "^4.2.8",
98+
"svelte": "^5.20.5",
10199
"vue-eslint-parser": "^9.3.2"
102100
},
103101
"pnpm": {
104102
"patchedDependencies": {
105-
"@types/[email protected]": "patches/@[email protected].patch"
103+
106104
},
107105
"overrides": {
108-
"prettier": "^3.1.1"
106+
"prettier": "^3.5.3"
109107
}
110108
}
111109
}

patches/@[email protected]

-14
This file was deleted.

patches/[email protected]

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
diff --git a/lib/configuration.js b/lib/configuration.js
2+
index 77f3969c1c583c5869f636076c15892d7f2da18f..48b3df03392ab1aafb5e714f39c015e2633ee0e2 100644
3+
--- a/lib/configuration.js
4+
+++ b/lib/configuration.js
5+
@@ -78,7 +78,7 @@
6+
* Shared settings for parsers and compilers (optional).
7+
*/
8+
9+
-import assert from 'node:assert/strict'
10+
+import assert from 'node:assert'
11+
import path from 'node:path'
12+
import {fileURLToPath, pathToFileURL} from 'node:url'
13+
import extend from 'extend'
14+
diff --git a/lib/file-pipeline/stringify.js b/lib/file-pipeline/stringify.js
15+
index d5e4e0d6d59ba76d72dc394b42e6e890a5d5e48e..01f0cf74a806ba17047b5e7f1587671cce38bbe5 100644
16+
--- a/lib/file-pipeline/stringify.js
17+
+++ b/lib/file-pipeline/stringify.js
18+
@@ -3,7 +3,7 @@
19+
* @import {Context} from './index.js'
20+
*/
21+
22+
-import assert from 'node:assert/strict'
23+
+import assert from 'node:assert'
24+
import createDebug from 'debug'
25+
import {inspectColor, inspectNoColor} from 'unist-util-inspect'
26+
import {statistics} from 'vfile-statistics'
27+
diff --git a/lib/file-pipeline/transform.js b/lib/file-pipeline/transform.js
28+
index a80702c25b5c6f6ffff52829a7bf98fe5f87cb3d..d6489b46bc5a113a14cfa4ab12c9a7aca1a777ea 100644
29+
--- a/lib/file-pipeline/transform.js
30+
+++ b/lib/file-pipeline/transform.js
31+
@@ -4,7 +4,7 @@
32+
* @import {Context} from './index.js'
33+
*/
34+
35+
-import assert from 'node:assert/strict'
36+
+import assert from 'node:assert'
37+
import createDebug from 'debug'
38+
import {statistics} from 'vfile-statistics'
39+
40+
diff --git a/lib/find-up.js b/lib/find-up.js
41+
index 81623700c8b53572ca7b0dd3e6d7c239b027d50c..9ff6176124f26f028c20d9142184e16cd8a5357d 100644
42+
--- a/lib/find-up.js
43+
+++ b/lib/find-up.js
44+
@@ -48,7 +48,7 @@
45+
* Turn a found file into a value.
46+
*/
47+
48+
-import assert from 'node:assert/strict'
49+
+import assert from 'node:assert'
50+
import fs from 'node:fs'
51+
import path from 'node:path'
52+
import {fileURLToPath} from 'node:url'

0 commit comments

Comments
 (0)