tools: improve update-eslint.sh

* Pin version numbers when using `npx`. This means we can be careful
  about updating what we run. (Thinking about the recent eslint-scope
  thing.)
* Add removeNPMAbsolutePaths to get rid of unused fields in package.json
  files. These unused fields can cause unnecessary churn, as at least
  one contains an absolute path that will be different for each
  developer.

PR-URL: https://github.com/nodejs/node/pull/21819
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
pull/21863/merge
Rich Trott 2018-07-14 19:28:53 -07:00
parent cb754f5845
commit 6ca5a8ac0c
1 changed files with 4 additions and 1 deletions

View File

@ -20,7 +20,10 @@ npm install --no-bin-links --production --no-package-lock eslint-plugin-markdown
cd ../..
# Use dmn to remove some unneeded files.
npx dmn -f clean
npx dmn@1.0.10 -f clean
# 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 .
cd ..
mv eslint-tmp/node_modules/eslint node_modules/eslint