0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00
nodejs/tools/update-eslint.sh
Rich Trott b5bad25110 tools: remove stray package-lock.json file
Before the ESLint updates were automated, a stray package-lock.json file
was accidentally introduced in the tools directory. This change removes
it.

PR-URL: https://github.com/nodejs/node/pull/14873
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-18 14:32:28 -07:00

31 lines
770 B
Bash
Executable File

#!/usr/bin/env bash
# Shell script to update ESLint in the source tree to the latest release.
# Depends on npm 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.
cd "$( dirname "${BASH_SOURCE[0]}" )"
rm -rf eslint
mkdir eslint-tmp
cd eslint-tmp
npm init --yes
npm install --global-style --no-bin-links --production --no-package-lock eslint@latest
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
cd ..
mv eslint-tmp/node_modules/eslint eslint
rm -rf eslint-tmp/