-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: update ESLint update script to consolidate dependencies
PR-URL: #40995 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
- Loading branch information
1 parent
8427099
commit 86d5af1
Showing
3 changed files
with
6 additions
and
46 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -5,23 +5,24 @@ | |
# 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 | ||
set -ex | ||
|
||
cd "$( dirname "$0" )" || exit | ||
rm -rf node_modules/eslint node_modules/eslint-plugin-markdown | ||
rm -rf node_modules/eslint | ||
( | ||
rm -rf eslint-tmp | ||
mkdir eslint-tmp | ||
cd eslint-tmp || exit | ||
|
||
ROOT="$PWD/../.." | ||
[ -z "$NODE" ] && NODE="$ROOT/out/Release/node" | ||
[ -x "$NODE" ] || NODE=`command -v node` | ||
[ -x "$NODE" ] || NODE=$(command -v node) | ||
NPM="$ROOT/deps/npm/bin/npm-cli.js" | ||
|
||
"$NODE" "$NPM" init --yes | ||
|
||
"$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts --no-package-lock eslint eslint-plugin-markdown | ||
|
||
"$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts eslint | ||
(cd node_modules/eslint && "$NODE" "$NPM" install --no-bin-links --ignore-scripts --production --omit=peer eslint-plugin-markdown @babel/core @babel/eslint-parser @babel/plugin-syntax-import-assertions) | ||
# Use dmn to remove some unneeded files. | ||
"$NODE" "$NPM" exec -- [email protected] -f clean | ||
# Use removeNPMAbsolutePaths to remove unused data in package.json. | ||
|
@@ -30,5 +31,4 @@ rm -rf node_modules/eslint node_modules/eslint-plugin-markdown | |
) | ||
|
||
mv eslint-tmp/node_modules/eslint node_modules/eslint | ||
mv eslint-tmp/node_modules/eslint-plugin-markdown node_modules/eslint-plugin-markdown | ||
rm -rf eslint-tmp/ |