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: #21744
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
Trott authored and targos committed Jul 14, 2018
1 parent e030dd7 commit c26ba08
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 c26ba08

Please sign in to comment.