@@ -7,11 +7,15 @@ permissions:
77
88jobs :
99 test :
10- name : TS ${{ matrix.ts_version }}, "${{ matrix.ts_lib }}"
10+ name : ESLint ${{ matrix.eslint_version }}, TS ${{ matrix.ts_version }}, "${{ matrix.ts_lib }}"
1111 runs-on : ubuntu-latest
1212 strategy :
1313 fail-fast : false
1414 matrix :
15+ eslint_version :
16+ - ' 7'
17+ - ' 8'
18+ - ' 9'
1519 ts_version :
1620 # The official ESLint types are not compatible with TS 3.9
1721 # - 3.9
2933 - es2015,dom
3034 - es2020
3135 - esnext
36+ exclude :
37+ # ESLint 9 ships types via @eslint/core which requires TS >= 5.0
38+ - eslint_version : ' 9'
39+ ts_version : ' 4.0'
40+ - eslint_version : ' 9'
41+ ts_version : 4.1
42+ - eslint_version : ' 9'
43+ ts_version : 4.2
44+ - eslint_version : ' 9'
45+ ts_version : 4.3
46+ - eslint_version : ' 9'
47+ ts_version : 4.4
48+ - eslint_version : ' 9'
49+ ts_version : 4.5
3250 steps :
3351 - uses : actions/checkout@v4
3452 with :
4159 node-version : ' lts/*'
4260 skip-ls-check : true
4361
62+ - name : select eslint types
63+ run : |
64+ if [ "${{ matrix.eslint_version }}" = "9" ]; then
65+ npm uninstall --no-save @types/eslint
66+ npm install --no-save eslint@^9 typescript@^5
67+ elif [ "${{ matrix.eslint_version }}" = "7" ]; then
68+ npm install --no-save eslint@^7 @types/eslint@7.2.10
69+ else
70+ npm uninstall --no-save @types/eslint
71+ npm install --no-save eslint@^${{ matrix.eslint_version }}
72+ fi
73+
4474 - name : build types
4575 run : npm run build-types
4676
6090 run : npm install
6191 working-directory : test-published-types
6292
93+ - name : select eslint for published types
94+ run : |
95+ if [ "${{ matrix.eslint_version }}" = "7" ]; then
96+ npm install --no-save eslint@^7
97+ else
98+ npm install --no-save eslint@^${{ matrix.eslint_version }}
99+ fi
100+ working-directory : test-published-types
101+
63102 - name : install eslint-plugin-react and typescript version ${{ matrix.ts_version }}
64103 run : npm install --no-save "$ESLINT_PLUGIN_REACT_PATH" typescript@${{ matrix.ts_version }}
65104 working-directory : test-published-types
0 commit comments