From e52f30e1bc457096af5637048530fb1ba2d8c1c0 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 14 Jul 2018 19:28:53 -0700 Subject: [PATCH] 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. --- tools/update-eslint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/update-eslint.sh b/tools/update-eslint.sh index 3663ecf74283c0..8092b7f0b8e93f 100755 --- a/tools/update-eslint.sh +++ b/tools/update-eslint.sh @@ -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