Browse Source

tools: fix update-eslint.sh

The script currently assumes that there is a package.json in
`eslint-tmp`. If there isn't the logic of the script fails.
This adds a call to `npm init --yes` ensuring there is a package.json
and that the script can do it's thing.

PR-URL: https://github.com/nodejs/node/pull/14850
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
v6.x
Myles Borins 7 years ago
parent
commit
cac4beb764
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 1
      tools/update-eslint.sh

1
tools/update-eslint.sh

@ -11,6 +11,7 @@ cd "$( dirname "${BASH_SOURCE[0]}" )"
rm -rf eslint
mkdir eslint-tmp
cd eslint-tmp
npm init --yes
npm install --global-style --no-binlinks --production eslint@latest
cd node_modules/eslint

Loading…
Cancel
Save