diff --git a/.github/workflows/node-4+.yml b/.github/workflows/node-4+.yml index 6456762fc..b13e3b88c 100644 --- a/.github/workflows/node-4+.yml +++ b/.github/workflows/node-4+.yml @@ -33,6 +33,11 @@ jobs: - 3 - 2 include: + - node-version: 'lts/*' + eslint: 7 + ts-parser: 3 + env: + TS_PARSER: 3 - node-version: 'lts/*' eslint: 7 ts-parser: 2 diff --git a/package.json b/package.json index d1a6bd5e0..9369f8875 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "devDependencies": { "@eslint/import-test-order-redirect-scoped": "file:./tests/files/order-redirect-scoped", "@test-scope/some-module": "file:./tests/files/symlinked-module", - "@typescript-eslint/parser": "^2.23.0 || ^3.3.0", + "@typescript-eslint/parser": "^2.23.0 || ^3.3.0 || ^4.29.3", "array.prototype.flatmap": "^1.2.4", "babel-cli": "^6.26.0", "babel-core": "^6.26.3", diff --git a/tests/dep-time-travel.sh b/tests/dep-time-travel.sh index ad00568e4..d6f5aedfc 100755 --- a/tests/dep-time-travel.sh +++ b/tests/dep-time-travel.sh @@ -8,10 +8,16 @@ export NPM_CONFIG_LEGACY_PEER_DEPS=true npm install --no-save "eslint@${ESLINT_VERSION}" --ignore-scripts -# completely remove the new TypeScript parser for ESLint < v5 -if [[ "$ESLINT_VERSION" -lt "5" ]]; then + + +if [[ -n "$TS_PARSER" ]]; then # if TS parser is manually set, always use it + echo "Downgrading @typescript-eslint/parser..." + npm i --no-save "@typescript-eslint/parser@${TS_PARSER}" +elif [[ "$ESLINT_VERSION" -lt "5" ]]; then # completely remove the new TypeScript parser for ESLint < v5 echo "Removing @typescript-eslint/parser..." npm uninstall --no-save @typescript-eslint/parser +elif [[ "$TRAVIS_NODE_VERSION" -lt "10" ]]; then # TS parser 3 requires node 10+ + npm i --no-save "@typescript-eslint/parser@3" fi # use these alternate TypeScript dependencies for ESLint < v4 @@ -28,8 +34,3 @@ if [[ "$TRAVIS_NODE_VERSION" -lt "8" ]]; then echo "Downgrading eslint-import-resolver-typescript..." npm i --no-save eslint-import-resolver-typescript@1.0.2 fi - -if [[ -n "$TS_PARSER" ]]; then - echo "Downgrading @typescript-eslint/parser..." - npm i --no-save @typescript-eslint/parser@2 -fi