File tree 3 files changed +14
-8
lines changed
3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 33
33
- 3
34
34
- 2
35
35
include :
36
+ - node-version : ' lts/*'
37
+ eslint : 7
38
+ ts-parser : 3
39
+ env :
40
+ TS_PARSER : 3
36
41
- node-version : ' lts/*'
37
42
eslint : 7
38
43
ts-parser : 2
Original file line number Diff line number Diff line change 56
56
"devDependencies" : {
57
57
"@eslint/import-test-order-redirect-scoped" : " file:./tests/files/order-redirect-scoped" ,
58
58
"@test-scope/some-module" : " file:./tests/files/symlinked-module" ,
59
- "@typescript-eslint/parser" : " ^2.23.0 || ^3.3.0" ,
59
+ "@typescript-eslint/parser" : " ^2.23.0 || ^3.3.0 || ^4.29.3 " ,
60
60
"array.prototype.flatmap" : " ^1.2.4" ,
61
61
"babel-cli" : " ^6.26.0" ,
62
62
"babel-core" : " ^6.26.3" ,
Original file line number Diff line number Diff line change @@ -8,10 +8,16 @@ export NPM_CONFIG_LEGACY_PEER_DEPS=true
8
8
9
9
npm install --no-save " eslint@${ESLINT_VERSION} " --ignore-scripts
10
10
11
- # completely remove the new TypeScript parser for ESLint < v5
12
- if [[ " $ESLINT_VERSION " -lt " 5" ]]; then
11
+
12
+
13
+ if [[ -n " $TS_PARSER " ]]; then # if TS parser is manually set, always use it
14
+ echo " Downgrading @typescript-eslint/parser..."
15
+ npm i --no-save " @typescript-eslint/parser@${TS_PARSER} "
16
+ elif [[ " $ESLINT_VERSION " -lt " 5" ]]; then # completely remove the new TypeScript parser for ESLint < v5
13
17
echo " Removing @typescript-eslint/parser..."
14
18
npm uninstall --no-save @typescript-eslint/parser
19
+ elif [[ " $TRAVIS_NODE_VERSION " -lt " 10" ]]; then # TS parser 3 requires node 10+
20
+ npm i --no-save " @typescript-eslint/parser@3"
15
21
fi
16
22
17
23
# use these alternate TypeScript dependencies for ESLint < v4
@@ -28,8 +34,3 @@ if [[ "$TRAVIS_NODE_VERSION" -lt "8" ]]; then
28
34
echo " Downgrading eslint-import-resolver-typescript..."
29
35
npm i --no-save eslint-import-resolver-typescript@1.0.2
30
36
fi
31
-
32
- if [[ -n " $TS_PARSER " ]]; then
33
- echo " Downgrading @typescript-eslint/parser..."
34
- npm i --no-save @typescript-eslint/parser@2
35
- fi
You can’t perform that action at this time.
0 commit comments