Skip to content

Commit 5526df2

Browse files
committed
ci(type-check): add ESLint 8 and 9 to published types matrix
Treat ESLint 7 as the only @types/eslint special case and use built-in ESLint types for 8+. Keep the existing ESLint 10 peer-dependency workaround and TS >= 5 restriction intact. This increases the type-check matrix from 48 to 120 jobs, so CI runtime will go up.
1 parent da2d10b commit 5526df2

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/type-check.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
matrix:
1515
eslint_version:
1616
- '7'
17+
- '8'
18+
- '9'
1719
- '10'
1820
ts_version:
1921
# The official ESLint types are not compatible with TS 3.9
@@ -65,8 +67,11 @@ jobs:
6567
npm prune --omit=dev
6668
npm uninstall --no-save @types/eslint
6769
npm install --no-save --legacy-peer-deps eslint@^10 typescript@^5
68-
else
70+
elif [ "${{ matrix.eslint_version }}" = "7" ]; then
6971
npm install --no-save eslint@^7 @types/eslint@7.2.10
72+
else
73+
npm uninstall --no-save @types/eslint
74+
npm install --no-save eslint@^${{ matrix.eslint_version }}
7075
fi
7176
7277
- name: build types
@@ -90,10 +95,10 @@ jobs:
9095

9196
- name: select eslint for published types
9297
run: |
93-
if [ "${{ matrix.eslint_version }}" = "10" ]; then
94-
npm install --no-save eslint@^10
95-
else
98+
if [ "${{ matrix.eslint_version }}" = "7" ]; then
9699
npm install --no-save eslint@^7
100+
else
101+
npm install --no-save eslint@^${{ matrix.eslint_version }}
97102
fi
98103
working-directory: test-published-types
99104

0 commit comments

Comments
 (0)