From accf2acdfb1798e13fb93c3f1667b79da92c39a3 Mon Sep 17 00:00:00 2001 From: Aviv Keller <38299977+RedYetiDev@users.noreply.github.com> Date: Tue, 6 Aug 2024 01:57:35 -0400 Subject: [PATCH] build: support `lint-js-fix` in `vcbuild.bat` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/53695 Reviewed-By: Yagiz Nizipli Reviewed-By: Vinícius Lourenço Claro Cardoso Reviewed-By: Stefan Stojanovic Reviewed-By: James M Snell Reviewed-By: Mohammed Keyvanzadeh --- vcbuild.bat | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vcbuild.bat b/vcbuild.bat index a2bed46dda65f0..3617bf9073307d 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -41,6 +41,7 @@ set msi= set upload= set licensertf= set lint_js= +set lint_js_fix= set lint_cpp= set lint_md= set lint_md_build= @@ -115,6 +116,7 @@ if /i "%1"=="test-v8-benchmarks" set test_v8_benchmarks=1&set custom_v8_test=1&g if /i "%1"=="test-v8-all" set test_v8=1&set test_v8_intl=1&set test_v8_benchmarks=1&set custom_v8_test=1&goto arg-ok if /i "%1"=="lint-cpp" set lint_cpp=1&goto arg-ok if /i "%1"=="lint-js" set lint_js=1&goto arg-ok +if /i "%1"=="lint-js-fix" set lint_js_fix=1&goto arg-ok if /i "%1"=="jslint" set lint_js=1&echo Please use lint-js instead of jslint&goto arg-ok if /i "%1"=="lint-md" set lint_md=1&goto arg-ok if /i "%1"=="lint-md-build" set lint_md_build=1&goto arg-ok @@ -730,10 +732,17 @@ goto lint-js goto lint-js :lint-js -if not defined lint_js goto lint-md-build +if not defined lint_js goto lint-js-fix if not exist tools\eslint\node_modules\eslint goto no-lint echo running lint-js %node_exe% tools\eslint\node_modules\eslint\bin\eslint.js --cache --max-warnings=0 --report-unused-disable-directives --rule "@stylistic/js/linebreak-style: 0" eslint.config.mjs benchmark doc lib test tools +goto lint-js-fix + +:lint-js-fix +if not defined lint_js_fix goto lint-md-build +if not exist tools\eslint\node_modules\eslint goto no-lint +echo running lint-js-fix +%node_exe% tools\eslint\node_modules\eslint\bin\eslint.js --cache --max-warnings=0 --report-unused-disable-directives --rule "@stylistic/js/linebreak-style: 0" eslint.config.mjs benchmark doc lib test tools --fix goto lint-md-build :no-lint