Skip to content

Commit 437e168

Browse files
authored
build: don't store eslint locally
PR-URL: #54231 Reviewed-By: Antoine du Hamel <[email protected]>
1 parent b77476d commit 437e168

File tree

3,124 files changed

+31
-409335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,124 files changed

+31
-409335
lines changed

.github/dependabot.yml

+13
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,16 @@ updates:
99
commit-message:
1010
prefix: meta
1111
open-pull-requests-limit: 10
12+
13+
- package-ecosystem: npm
14+
directory: /tools/eslint
15+
schedule:
16+
interval: monthly
17+
commit-message:
18+
prefix: tools
19+
open-pull-requests-limit: 10
20+
groups:
21+
eslint:
22+
applies-to: version-updates
23+
patterns:
24+
- '*'

.github/workflows/tools.yml

-9
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ on:
2222
- cjs-module-lexer
2323
- corepack
2424
- doc
25-
- eslint
2625
- github_reporter
2726
- googletest
2827
- gyp-next
@@ -137,14 +136,6 @@ jobs:
137136
npm install --ignore-scripts $NEW_VERSION
138137
npm install --ignore-scripts
139138
fi
140-
- id: eslint
141-
subsystem: tools
142-
label: tools
143-
run: |
144-
./tools/dep_updaters/update-eslint.sh > temp-output
145-
cat temp-output
146-
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
147-
rm temp-output
148139
- id: github_reporter
149140
subsystem: tools
150141
label: tools

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ tools/*/*.i.tmp
112112
/node_modules
113113
/tools/doc/node_modules
114114
/tools/clang-format/node_modules
115+
/tools/eslint/node_modules
115116

116117
# === Rules for test artifacts ===
117118
/*.tap

LICENSE

-23
Original file line numberDiff line numberDiff line change
@@ -2233,29 +2233,6 @@ The externally maintained libraries used by Node.js are:
22332233
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22342234
"""
22352235

2236-
- ESLint, located at tools/eslint/node_modules/eslint, is licensed as follows:
2237-
"""
2238-
Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
2239-
2240-
Permission is hereby granted, free of charge, to any person obtaining a copy
2241-
of this software and associated documentation files (the "Software"), to deal
2242-
in the Software without restriction, including without limitation the rights
2243-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2244-
copies of the Software, and to permit persons to whom the Software is
2245-
furnished to do so, subject to the following conditions:
2246-
2247-
The above copyright notice and this permission notice shall be included in
2248-
all copies or substantial portions of the Software.
2249-
2250-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2251-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2252-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2253-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2254-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2255-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2256-
THE SOFTWARE.
2257-
"""
2258-
22592236
- gtest, located at deps/googletest, is licensed as follows:
22602237
"""
22612238
Copyright 2008, Google Inc.

Makefile

+8-4
Original file line numberDiff line numberDiff line change
@@ -1388,16 +1388,19 @@ run-lint-js = tools/eslint/node_modules/eslint/bin/eslint.js --cache \
13881388
--max-warnings=0 --report-unused-disable-directives $(LINT_JS_TARGETS)
13891389
run-lint-js-fix = $(run-lint-js) --fix
13901390

1391+
tools/eslint/node_modules: tools/eslint/package-lock.json
1392+
-cd tools/eslint && $(call available-node,$(run-npm-ci))
1393+
13911394
.PHONY: lint-js-fix
1392-
lint-js-fix:
1395+
lint-js-fix: tools/eslint/node_modules
13931396
@$(call available-node,$(run-lint-js-fix))
13941397

13951398
.PHONY: lint-js
13961399
.PHONY: lint-js-doc
13971400
# Note that on the CI `lint-js-ci` is run instead.
13981401
# Lints the JavaScript code with eslint.
13991402
lint-js-doc: LINT_JS_TARGETS=doc
1400-
lint-js lint-js-doc:
1403+
lint-js lint-js-doc: tools/eslint/node_modules
14011404
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
14021405
echo "Skipping $@ (no crypto)"; \
14031406
else \
@@ -1414,7 +1417,7 @@ run-lint-js-ci = tools/eslint/node_modules/eslint/bin/eslint.js \
14141417

14151418
.PHONY: lint-js-ci
14161419
# On the CI the output is emitted in the TAP format.
1417-
lint-js-ci:
1420+
lint-js-ci: tools/eslint/node_modules
14181421
$(info Running JS linter...)
14191422
@$(call available-node,$(run-lint-js-ci))
14201423

@@ -1568,7 +1571,7 @@ lint-yaml:
15681571

15691572
.PHONY: lint
15701573
.PHONY: lint-ci
1571-
ifneq ("","$(wildcard tools/eslint/node_modules/eslint/)")
1574+
ifneq ("","$(wildcard tools/eslint/)")
15721575
lint: ## Run JS, C++, MD and doc linters.
15731576
@EXIT_STATUS=0 ; \
15741577
$(MAKE) lint-js || EXIT_STATUS=$$? ; \
@@ -1599,6 +1602,7 @@ endif
15991602
lint-clean:
16001603
$(RM) tools/.*lintstamp
16011604
$(RM) .eslintcache
1605+
$(RM) -r tools/eslint/node_modules
16021606

16031607
HAS_DOCKER ?= $(shell command -v docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
16041608

tools/dep_updaters/update-eslint.sh

-49
This file was deleted.

tools/eslint/node_modules/@ampproject/remapping/LICENSE

-202
This file was deleted.

0 commit comments

Comments
 (0)