-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: drop ESLint v2, v3, v4, v5, v6 & v7 support
BREAKING CHANGE: Requires ESLint@^8.57.0 || ^9.0.0
- Loading branch information
1 parent
1752feb
commit a240113
Showing
5 changed files
with
10 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,37 +2,12 @@ | |
|
||
# expected: ESLINT_VERSION numeric env var | ||
|
||
echo "installing ${ESLINT_VERSION} with TS parser ${TS_PARSER:-default}..." | ||
echo "installing ${ESLINT_VERSION}..." | ||
|
||
export NPM_CONFIG_LEGACY_PEER_DEPS=true | ||
|
||
if [[ "$ESLINT_VERSION" -lt "7" ]]; then | ||
echo "Removing @angular-eslint/template-parser..." | ||
npm uninstall --no-save @angular-eslint/template-parser | ||
fi | ||
|
||
npm install --no-save "eslint@${ESLINT_VERSION}" --ignore-scripts | ||
|
||
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 | ||
fi | ||
|
||
# use these alternate TypeScript dependencies for ESLint < v4 | ||
if [[ "$ESLINT_VERSION" -lt "4" ]]; then | ||
echo "Downgrading babel-eslint..." | ||
npm i --no-save [email protected] | ||
|
||
echo "Downgrading TypeScript dependencies..." | ||
npm i --no-save typescript-eslint-parser@15 [email protected] | ||
elif [[ "$ESLINT_VERSION" -lt "7" ]]; then | ||
echo "Downgrading TypeScript dependencies..." | ||
npm i --no-save typescript-eslint-parser@20 | ||
fi | ||
|
||
if [ "${ESLINT_VERSION}" = '8' ]; then | ||
# This is a workaround for the crash in the initial processing of the ESLint class. | ||
echo "Installing self" | ||
|