|
2 | 2 |
|
3 | 3 | # expected: ESLINT_VERSION numeric env var |
4 | 4 |
|
5 | | -echo "installing ${ESLINT_VERSION} with TS parser ${TS_PARSER:-default}..." |
| 5 | +echo "installing ${ESLINT_VERSION}..." |
6 | 6 |
|
7 | 7 | export NPM_CONFIG_LEGACY_PEER_DEPS=true |
8 | 8 |
|
9 | | -if [[ "$ESLINT_VERSION" -lt "7" ]]; then |
10 | | - echo "Removing @angular-eslint/template-parser..." |
11 | | - npm uninstall --no-save @angular-eslint/template-parser |
12 | | -fi |
13 | | - |
14 | 9 | npm install --no-save "eslint@${ESLINT_VERSION}" --ignore-scripts |
15 | 10 |
|
16 | | -if [[ -n "$TS_PARSER" ]]; then # if TS parser is manually set, always use it |
17 | | - echo "Downgrading @typescript-eslint/parser..." |
18 | | - npm i --no-save "@typescript-eslint/parser@${TS_PARSER}" |
19 | | -elif [[ "$ESLINT_VERSION" -lt "5" ]]; then # completely remove the new TypeScript parser for ESLint < v5 |
20 | | - echo "Removing @typescript-eslint/parser..." |
21 | | - npm uninstall --no-save @typescript-eslint/parser |
22 | | -fi |
23 | | - |
24 | | -# use these alternate TypeScript dependencies for ESLint < v4 |
25 | | -if [[ "$ESLINT_VERSION" -lt "4" ]]; then |
26 | | - echo "Downgrading babel-eslint..." |
27 | | - |
28 | | - |
29 | | - echo "Downgrading TypeScript dependencies..." |
30 | | - npm i --no-save typescript-eslint-parser@15 [email protected] |
31 | | -elif [[ "$ESLINT_VERSION" -lt "7" ]]; then |
32 | | - echo "Downgrading TypeScript dependencies..." |
33 | | - npm i --no-save typescript-eslint-parser@20 |
34 | | -fi |
35 | | - |
36 | 11 | if [ "${ESLINT_VERSION}" = '8' ]; then |
37 | 12 | # This is a workaround for the crash in the initial processing of the ESLint class. |
38 | 13 | echo "Installing self" |
|
0 commit comments