Skip to content

Commit

Permalink
tools: improve update-eslint.sh
Browse files Browse the repository at this point in the history
* 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: nodejs#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>
  • Loading branch information
Trott committed Jul 20, 2018
1 parent cb754f5 commit 6ca5a8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/update-eslint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ca5a8a

Please sign in to comment.