diff options
author | zhangyongsheng <zhangyongsheng@youzan.com> | 2020-12-19 16:57:15 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2021-05-01 10:44:45 +0300 |
commit | b398e4044c7e5a1f3684477944bc138915d2c9c5 (patch) | |
tree | b24b50681f6b95e37576a1294bf98a2896c62608 /tools | |
parent | 681c4afc51ccac82cee65fcc6f0f9b8f55f00b81 (diff) |
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>
Diffstat (limited to 'tools')
-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 f3e43ae31d2..d0320ab8f84 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/ |