File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,11 +7,14 @@ 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+ - ' 10'
1518 ts_version :
1619 # The official ESLint types are not compatible with TS 3.9
1720 # - 3.9
2932 - es2015,dom
3033 - es2020
3134 - esnext
35+ exclude :
36+ # ESLint 10 types require TS >= 4.1 (mapped type `as`).
37+ - eslint_version : ' 10'
38+ ts_version : ' 4.0'
3239 steps :
3340 - uses : actions/checkout@v4
3441 with :
4148 node-version : ' lts/*'
4249 skip-ls-check : true
4350
51+ - name : select eslint types
52+ run : |
53+ if [ "${{ matrix.eslint_version }}" = "10" ]; then
54+ # Avoid dev dependency peer conflicts with eslint@10.
55+ npm prune --omit=dev
56+ npm uninstall --no-save @types/eslint
57+ npm install --no-save --legacy-peer-deps eslint@^10 typescript@^5
58+ else
59+ npm install --no-save eslint@^7 @types/eslint@7.2.10
60+ fi
61+
4462 - name : build types
4563 run : npm run build-types
4664
6482 run : npm install --no-save "$ESLINT_PLUGIN_REACT_PATH" typescript@${{ matrix.ts_version }}
6583 working-directory : test-published-types
6684
85+ - name : select eslint for published types
86+ run : |
87+ if [ "${{ matrix.eslint_version }}" = "10" ]; then
88+ npm install --no-save eslint@^10
89+ else
90+ npm install --no-save eslint@^7
91+ fi
92+ working-directory : test-published-types
93+
6794 - name : show installed typescript version
6895 run : npm list typescript --depth=0
6996 working-directory : test-published-types
You can’t perform that action at this time.
0 commit comments