Skip to content

Commit 0a1b399

Browse files
committed
tools: fix ESLint update scripts
Changes to the npm dependency in the core repo require changes to update-eslint.sh and update-bable-eslint.sh. PR-URL: #40394 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 40db88b commit 0a1b399

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tools/update-babel-eslint.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# This script must be be in the tools directory when it runs because it uses
66
# $0 to determine directories to work in.
77

8+
set -e
9+
810
cd "$( dirname "${0}" )" || exit
911
rm -rf node_modules/@babel
1012
mkdir babel-eslint-tmp
@@ -13,7 +15,7 @@ cd babel-eslint-tmp || exit
1315
ROOT="$PWD/../.."
1416
[ -z "$NODE" ] && NODE="$ROOT/out/Release/node"
1517
[ -x "$NODE" ] || NODE=`command -v node`
16-
NPM="$ROOT/deps/npm"
18+
NPM="$ROOT/deps/npm/bin/npm-cli.js"
1719

1820
"$NODE" "$NPM" init --yes
1921
"$NODE" "$NPM" install --global-style --no-bin-links --production --no-package-lock @babel/core @babel/eslint-parser@latest @babel/plugin-syntax-class-properties@latest @babel/plugin-syntax-import-assertions@latest @babel/plugin-syntax-top-level-await@latest

tools/update-eslint.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# This script must be in the tools directory when it runs because it uses the
66
# script source file path to determine directories to work in.
77

8+
set -e
9+
810
cd "$( dirname "$0" )" || exit
911
rm -rf node_modules/eslint node_modules/eslint-plugin-markdown
1012
(
@@ -14,7 +16,7 @@ rm -rf node_modules/eslint node_modules/eslint-plugin-markdown
1416
ROOT="$PWD/../.."
1517
[ -z "$NODE" ] && NODE="$ROOT/out/Release/node"
1618
[ -x "$NODE" ] || NODE=`command -v node`
17-
NPM="$ROOT/deps/npm"
19+
NPM="$ROOT/deps/npm/bin/npm-cli.js"
1820

1921
"$NODE" "$NPM" init --yes
2022

0 commit comments

Comments
 (0)