Skip to content

Commit 0507535

Browse files
Trottaddaleax
authored andcommitted
tools: remove lint-js.js
lint-js.js was implemented before ESLint had a caching feature. It is now only used in CI. Let's remove it on the following grounds: * It results in occasional (and puzzling) yellow CI runs for node-test-linter because the tap file is corrupted somehow. Interleaved maybe? I don't know, but a simple solution is removing it and running ESLint directly. * On my local laptop, it reduces the linting from about 75 seconds to about 55 seconds. This kind of savings is not worth the added complexity and the instability noted above. PR-URL: #30955 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 089a447 commit 0507535

File tree

3 files changed

+4
-283
lines changed

3 files changed

+4
-283
lines changed

Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -1239,8 +1239,9 @@ lint-js:
12391239
jslint: lint-js
12401240
@echo "Please use lint-js instead of jslint"
12411241

1242-
run-lint-js-ci = tools/lint-js.js $(PARALLEL_ARGS) -f tap -o test-eslint.tap \
1243-
$(LINT_JS_TARGETS)
1242+
run-lint-js-ci = tools/node_modules/eslint/bin/eslint.js \
1243+
--report-unused-disable-directives --ext=.js,.mjs,.md -f tap \
1244+
-o test-eslint.tap $(LINT_JS_TARGETS)
12441245

12451246
.PHONY: lint-js-ci
12461247
# On the CI the output is emitted in the TAP format.

tools/lint-js.js

-272
This file was deleted.

vcbuild.bat

+1-9
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ if /i "%1"=="test-v8-all" set test_v8=1&set test_v8_intl=1&set test_v8_ben
118118
if /i "%1"=="lint-cpp" set lint_cpp=1&goto arg-ok
119119
if /i "%1"=="lint-js" set lint_js=1&goto arg-ok
120120
if /i "%1"=="jslint" set lint_js=1&echo Please use lint-js instead of jslint&goto arg-ok
121-
if /i "%1"=="lint-js-ci" set lint_js_ci=1&goto arg-ok
122-
if /i "%1"=="jslint-ci" set lint_js_ci=1&echo Please use lint-js-ci instead of jslint-ci&goto arg-ok
123121
if /i "%1"=="lint-md" set lint_md=1&goto arg-ok
124122
if /i "%1"=="lint-md-build" set lint_md_build=1&goto arg-ok
125123
if /i "%1"=="lint" set lint_cpp=1&set lint_js=1&set lint_md=1&goto arg-ok
@@ -655,18 +653,12 @@ goto lint-js
655653
goto lint-js
656654

657655
:lint-js
658-
if defined lint_js_ci goto lint-js-ci
659656
if not defined lint_js goto lint-md-build
660657
if not exist tools\node_modules\eslint goto no-lint
661658
echo running lint-js
662659
%node_exe% tools\node_modules\eslint\bin\eslint.js --cache --report-unused-disable-directives --rule "linebreak-style: 0" --ext=.js,.mjs,.md .eslintrc.js benchmark doc lib test tools
663660
goto lint-md-build
664661

665-
:lint-js-ci
666-
echo running lint-js-ci
667-
%node_exe% tools\lint-js.js -J -f tap -o test-eslint.tap benchmark doc lib test tools
668-
goto lint-md-build
669-
670662
:no-lint
671663
echo Linting is not available through the source tarball.
672664
echo Use the git repo instead: $ git clone https://github.com/nodejs/node.git
@@ -701,7 +693,7 @@ set exit_code=1
701693
goto exit
702694

703695
:help
704-
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-js-native-api/test-node-api/test-benchmark/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2017/vs2019] [download-all] [lint/lint-ci/lint-js/lint-js-ci/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm]
696+
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-js-native-api/test-node-api/test-benchmark/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2017/vs2019] [download-all] [lint/lint-ci/lint-js/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm]
705697
echo Examples:
706698
echo vcbuild.bat : builds release build
707699
echo vcbuild.bat debug : builds debug build

0 commit comments

Comments
 (0)