Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 609df01

Browse filesBrowse files
lpincajuanarbol
authored andcommitted
tools: make update-eslint.sh work with npm@9
Make the `update-eslint.sh` script work with `npm@9`. PR-URL: #46088 Refs: https://github.com/nodejs/node/actions/runs/3814364920/jobs/6488613583#step:3:64 Reviewed-By: Ruy Adorno <ruyadorno@google.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent d8ce990 commit 609df01
Copy full SHA for 609df01

File tree

Expand file treeCollapse file tree

1 file changed

+34
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+34
-6
lines changed
Open diff view settings
Collapse file

‎tools/update-eslint.sh‎

Copy file name to clipboardExpand all lines: tools/update-eslint.sh
+34-6Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,41 @@ rm -rf node_modules/eslint
2121

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

24-
"$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts eslint
25-
# Uninstall plugins that we want to install so that they are removed from devDependencies.
26-
# Otherwise --production will cause them to be skipped.
27-
(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)
28-
(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)
24+
"$NODE" "$NPM" install \
25+
--ignore-scripts \
26+
--install-strategy=shallow \
27+
--no-bin-links \
28+
eslint
29+
# Uninstall plugins that we want to install so that they are removed from
30+
# devDependencies. Otherwise --omit=dev will cause them to be skipped.
31+
(
32+
cd node_modules/eslint
33+
"$NODE" "$NPM" uninstall \
34+
--install-links=false \
35+
--ignore-scripts \
36+
eslint-plugin-jsdoc \
37+
eslint-plugin-markdown \
38+
@babel/core \
39+
@babel/eslint-parser \
40+
@babel/plugin-syntax-import-assertions
41+
)
42+
(
43+
cd node_modules/eslint
44+
"$NODE" "$NPM" install \
45+
--ignore-scripts \
46+
--install-links=false \
47+
--no-bin-links \
48+
--no-save \
49+
--omit=dev \
50+
--omit=peer \
51+
eslint-plugin-jsdoc \
52+
eslint-plugin-markdown \
53+
@babel/core \
54+
@babel/eslint-parser \
55+
@babel/plugin-syntax-import-assertions
56+
)
2957
# Use dmn to remove some unneeded files.
30-
"$NODE" "$NPM" exec -- dmn@2.2.2 -f clean
58+
"$NODE" "$NPM" exec --package=dmn@2.2.2 --yes -- dmn -f clean
3159
# TODO: Get this into dmn.
3260
find node_modules -name .package-lock.json -exec rm {} \;
3361
find node_modules -name 'README*' -exec rm {} \;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.