From 2dc570e2c553f0589f8654733af7218c84eee797 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 29 Nov 2021 16:41:05 -0800 Subject: [PATCH] tools: include JSDoc in ESLint updating tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/41027 Reviewed-By: Michaƫl Zasso Reviewed-By: Antoine du Hamel --- tools/update-eslint.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/update-eslint.sh b/tools/update-eslint.sh index 5f87680597fb18..5f211566993a45 100755 --- a/tools/update-eslint.sh +++ b/tools/update-eslint.sh @@ -20,13 +20,16 @@ rm -rf node_modules/eslint node_modules/eslint-plugin-markdown "$NODE" "$NPM" init --yes - "$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts --no-package-lock eslint eslint-plugin-markdown - + "$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts eslint + # Uninstall plugins that we want to install so that they are removed from devDependencies. + # Otherwise --production will cause them to be skipped. + (cd node_modules/eslint && "$NODE" "$NPM" uninstall --ignore-scripts eslint-plugin-jsdoc eslint-plugin-markdown @babel/core @babel/eslint-parser @babel/plugin-syntax-import-assertions) + (cd node_modules/eslint && "$NODE" "$NPM" install --no-save --no-bin-links --ignore-scripts --production --omit=peer eslint-plugin-jsdoc eslint-plugin-markdown @babel/core @babel/eslint-parser @babel/plugin-syntax-import-assertions) # Use dmn to remove some unneeded files. "$NODE" "$NPM" exec -- dmn@2.2.2 -f clean - # Use removeNPMAbsolutePaths to remove unused data in package.json. - # This avoids churn as absolute paths can change from one dev to another. - "$NODE" "$NPM" exec -- removeNPMAbsolutePaths@1.0.4 . + # TODO: Get this into dmn. + find node_modules -name .package-lock.json -exec rm {} \; + find node_modules -name 'README*' -exec rm {} \; ) mv eslint-tmp/node_modules/eslint node_modules/eslint