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: #21819
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
  • Loading branch information
Trott authored and targos committed Jul 20, 2018
1 parent af1530e commit f89d194
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 [email protected] -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 [email protected] .

cd ..
mv eslint-tmp/node_modules/eslint node_modules/eslint
Expand Down

0 comments on commit f89d194

Please sign in to comment.