Skip to content

Commit 2dc570e

Browse files
Trottdanielleadams
authored andcommitted
tools: include JSDoc in ESLint updating tool
PR-URL: #41027 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 0c7c4af commit 2dc570e

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

tools/update-eslint.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ rm -rf node_modules/eslint node_modules/eslint-plugin-markdown
2020

2121
"$NODE" "$NPM" init --yes
2222

23-
"$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts --no-package-lock eslint eslint-plugin-markdown
24-
23+
"$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts eslint
24+
# Uninstall plugins that we want to install so that they are removed from devDependencies.
25+
# Otherwise --production will cause them to be skipped.
26+
(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)
27+
(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)
2528
# Use dmn to remove some unneeded files.
2629
"$NODE" "$NPM" exec -- dmn@2.2.2 -f clean
27-
# Use removeNPMAbsolutePaths to remove unused data in package.json.
28-
# This avoids churn as absolute paths can change from one dev to another.
29-
"$NODE" "$NPM" exec -- removeNPMAbsolutePaths@1.0.4 .
30+
# TODO: Get this into dmn.
31+
find node_modules -name .package-lock.json -exec rm {} \;
32+
find node_modules -name 'README*' -exec rm {} \;
3033
)
3134

3235
mv eslint-tmp/node_modules/eslint node_modules/eslint

0 commit comments

Comments
 (0)