Skip to content

Commit 1c2d17e

Browse files
committed
[Tests] only install peer dependencies with legacy mode when testing @typescript-eslint/parser < v6
1 parent fa0337d commit 1c2d17e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/node-18+.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
after_install: |
105105
npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ matrix.typescript-eslint }}" "babel-eslint@${{ matrix.babel-eslint }}"
106106
env:
107-
NPM_CONFIG_LEGACY_PEER_DEPS: true
107+
NPM_CONFIG_LEGACY_PEER_DEPS: "${{ matrix.typescript-eslint >= 6 && 'false' || 'true' }}"
108108
- run: npx ls-engines
109109
- run: npm run unit-test
110110
- uses: codecov/[email protected]

.github/workflows/node-minors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ matrix.node-version >= 18 && matrix.eslint >= 8 && '8' || (matrix.node-version >= 16 && matrix.eslint >= 7 && '6' || (matrix.node-version >= 14 && '5' || (matrix.node-version >= 12 && '4' || (matrix.node-version >= 10 && '4.0' || (matrix.node-version >= 8 && '3' || '2'))))) }}" "babel-eslint@${{ matrix.babel-eslint }}"
104104
skip-ls-check: ${{ matrix.node-version < 10 && true || false }}
105105
env:
106-
NPM_CONFIG_LEGACY_PEER_DEPS: true
106+
NPM_CONFIG_LEGACY_PEER_DEPS: "${{ matrix.node-version >= 16 && matrix.eslint >= 7 && 'false' || 'true' }}"
107107
- run: npx ls-engines
108108
if: ${{ matrix.node-version >= 12 }}
109109
- run: npm run unit-test

0 commit comments

Comments
 (0)