Skip to content

Commit

Permalink
tools: avoid global install of dmn for lint update
Browse files Browse the repository at this point in the history
When updating ESLint, use npx to run dmn rather than installing dmn
globally.

PR-URL: nodejs#21744
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
Trott committed Jul 13, 2018
1 parent 8cae9b2 commit 19bc893
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tools/update-eslint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Shell script to update ESLint in the source tree to the latest release.

# Depends on npm and node being in $PATH.
# Depends on npm, npx, and node being in $PATH.

# This script must be be in the tools directory when it runs because it uses
# $BASH_SOURCE[0] to determine directories to work in.
Expand All @@ -19,11 +19,8 @@ cd node_modules/eslint
npm install --no-bin-links --production --no-package-lock eslint-plugin-markdown@next
cd ../..

# Install dmn if it is not in path.
type -P dmn || npm install -g dmn

# Use dmn to remove some unneeded files.
dmn -f clean
npx dmn -f clean

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

0 comments on commit 19bc893

Please sign in to comment.