diff --git a/tests/dep-time-travel.sh b/tests/dep-time-travel.sh index 768ee134e8..e130877c79 100755 --- a/tests/dep-time-travel.sh +++ b/tests/dep-time-travel.sh @@ -10,16 +10,17 @@ npm install --no-save "eslint@${ESLINT_VERSION}" --ignore-scripts -if [[ -n "$TS_PARSER" ]]; then # if TS parser is manually set, always use it +if [ "${ESLINT_VERSION}" = '^8.0.0-0' ]; then + # workaround for eslint beta. + echo "remove this branch when eslint v8 stable version is released." +elif [[ -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" =~ "^[0-9]+$" ]] ; then # workaround for eslint beta. - if [[ "$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 +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