Skip to content

Commit

Permalink
tools: fix ESLint update scripts
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Trott authored and pull[bot] committed May 3, 2022
1 parent a31cea0 commit 242d80c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tools/update-babel-eslint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# This script must be be in the tools directory when it runs because it uses
# $0 to determine directories to work in.

set -e

cd "$( dirname "${0}" )" || exit
rm -rf node_modules/@babel
mkdir babel-eslint-tmp
Expand All @@ -13,7 +15,7 @@ cd babel-eslint-tmp || exit
ROOT="$PWD/../.."
[ -z "$NODE" ] && NODE="$ROOT/out/Release/node"
[ -x "$NODE" ] || NODE=`command -v node`
NPM="$ROOT/deps/npm"
NPM="$ROOT/deps/npm/bin/npm-cli.js"

"$NODE" "$NPM" init --yes
"$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
Expand Down
4 changes: 3 additions & 1 deletion tools/update-eslint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# This script must be in the tools directory when it runs because it uses the
# script source file path to determine directories to work in.

set -e

cd "$( dirname "$0" )" || exit
rm -rf node_modules/eslint node_modules/eslint-plugin-markdown
(
Expand All @@ -14,7 +16,7 @@ rm -rf node_modules/eslint node_modules/eslint-plugin-markdown
ROOT="$PWD/../.."
[ -z "$NODE" ] && NODE="$ROOT/out/Release/node"
[ -x "$NODE" ] || NODE=`command -v node`
NPM="$ROOT/deps/npm"
NPM="$ROOT/deps/npm/bin/npm-cli.js"

"$NODE" "$NPM" init --yes

Expand Down

0 comments on commit 242d80c

Please sign in to comment.