diff options
author | zhangyongsheng <zhangyongsheng@youzan.com> | 2020-12-19 21:57:15 +0800 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2020-12-21 18:24:30 +0100 |
commit | f3828c9dcb75f771d1dbf6515629a5cd25f0fb90 (patch) | |
tree | 87d1f08834c076be308001471aaf51a156848fbb | |
parent | e1f00fd9960ebb5679d694ec28fba2e105f1a086 (diff) | |
download | node-new-f3828c9dcb75f771d1dbf6515629a5cd25f0fb90.tar.gz |
tools: fix update-eslint.sh
PR-URL: https://github.com/nodejs/node/pull/36579
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-rwxr-xr-x | tools/update-eslint.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/update-eslint.sh b/tools/update-eslint.sh index f3e43ae31d..d0320ab8f8 100755 --- a/tools/update-eslint.sh +++ b/tools/update-eslint.sh @@ -9,18 +9,18 @@ cd "$( dirname "$0" )" || exit rm -rf node_modules/eslint -{ +( mkdir eslint-tmp cd eslint-tmp || exit npm init --yes npm install --global-style --no-bin-links --production --no-package-lock eslint@latest - { + ( cd node_modules/eslint || exit npm install --no-bin-links --production --no-package-lock eslint-plugin-markdown@latest - } + ) # Use dmn to remove some unneeded files. @@ -28,7 +28,7 @@ rm -rf node_modules/eslint # Use removeNPMAbsolutePaths to remove unused data in package.json. # This avoids churn as absolute paths can change from one dev to another. npx removeNPMAbsolutePaths@1.0.4 . -} +) mv eslint-tmp/node_modules/eslint node_modules/eslint rm -rf eslint-tmp/ |