Skip to content

Commit

Permalink
[Tests] add @typescript-eslint/parser v6, v7, v8
Browse files Browse the repository at this point in the history
 - only install peer dependencies with legacy mode when testing @typescript-eslint/parser < v6
  • Loading branch information
HenryBrown0 authored and ljharb committed Nov 27, 2023
1 parent d5e3769 commit c4fcff9
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 5 deletions.
62 changes: 60 additions & 2 deletions .github/workflows/node-18+.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,64 @@ jobs:
- 10
- 9
- 8
typescript-eslint:
- 5
- 6
- 7
- 8
exclude:
- eslint: 3
babel-eslint: 10
- eslint: 3
typescript-eslint: 5
- eslint: 4
typescript-eslint: 5
- eslint: 4.14
typescript-eslint: 5
- eslint: 5
typescript-eslint: 5
- eslint: 3
typescript-eslint: 6
- eslint: 4
typescript-eslint: 6
- eslint: 4.14
typescript-eslint: 6
- eslint: 5
typescript-eslint: 6
- eslint: 6
typescript-eslint: 6
- eslint: 9
typescript-eslint: 6
- eslint: 3
typescript-eslint: 7
- eslint: 4
typescript-eslint: 7
- eslint: 4.14
typescript-eslint: 7
- eslint: 5
typescript-eslint: 7
- eslint: 6
typescript-eslint: 7
- eslint: 7
typescript-eslint: 7
- eslint: 9
typescript-eslint: 7
- eslint: 3
typescript-eslint: 8
- eslint: 4
typescript-eslint: 8
- eslint: 4.14
typescript-eslint: 8
- eslint: 5
typescript-eslint: 8
- eslint: 6
typescript-eslint: 8
- eslint: 7
typescript-eslint: 8
- eslint: 9
typescript-eslint: 5
- node-version: 19
typescript-eslint: 7

steps:
- uses: actions/checkout@v4
Expand All @@ -46,9 +104,9 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
after_install: |
npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@5" "babel-eslint@${{ matrix.babel-eslint }}"
npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ matrix.typescript-eslint }}" "babel-eslint@${{ matrix.babel-eslint }}"
env:
NPM_CONFIG_LEGACY_PEER_DEPS: true
NPM_CONFIG_LEGACY_PEER_DEPS: "${{ matrix.typescript-eslint >= 6 && 'false' || 'true' }}"
- run: npx ls-engines
- run: npm run unit-test
- uses: codecov/codecov-action@v3.1.5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/node-minors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
after_install: |
npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ 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 }}"
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 }}"
skip-ls-check: ${{ matrix.node-version < 10 && true || false }}
env:
NPM_CONFIG_LEGACY_PEER_DEPS: true
NPM_CONFIG_LEGACY_PEER_DEPS: "${{ matrix.node-version >= 16 && matrix.eslint >= 7 && 'false' || 'true' }}"
- run: npx ls-engines
if: ${{ matrix.node-version >= 12 }}
- run: npm run unit-test
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
### Added
* [`no-string-refs`]: allow this.refs in > 18.3.0 ([#3807][] @henryqdineen)

### Changed
* [Tests] add @typescript-eslint/parser v6 ([#3629][] @HenryBrown0)
* [Tests] add @typescript-eslint/parser v7 and v8 ([#3629][] @hampustagerud)

[#3629]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3629
[#3807]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3807

## [7.35.2] - 2024.09.03
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@types/eslint": "=7.2.10",
"@types/estree": "0.0.52",
"@types/node": "^4.9.5",
"@typescript-eslint/parser": "^2.34.0 || ^3.10.1 || ^4.0.0 || ^5.0.0",
"@typescript-eslint/parser": "^2.34.0 || ^3.10.1 || ^4 || ^5 || ^6.20 || ^7.14.1 || ^8.4",
"babel-eslint": "^8 || ^9 || ^10.1.0",
"eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7",
"eslint-config-airbnb-base": "^15.0.0",
Expand Down

0 comments on commit c4fcff9

Please sign in to comment.