Skip to content

Commit accf2ac

Browse files
authored
build: support lint-js-fix in vcbuild.bat
PR-URL: #53695 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
1 parent 5f52c8a commit accf2ac

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

vcbuild.bat

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ set msi=
4141
set upload=
4242
set licensertf=
4343
set lint_js=
44+
set lint_js_fix=
4445
set lint_cpp=
4546
set lint_md=
4647
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
115116
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
116117
if /i "%1"=="lint-cpp" set lint_cpp=1&goto arg-ok
117118
if /i "%1"=="lint-js" set lint_js=1&goto arg-ok
119+
if /i "%1"=="lint-js-fix" set lint_js_fix=1&goto arg-ok
118120
if /i "%1"=="jslint" set lint_js=1&echo Please use lint-js instead of jslint&goto arg-ok
119121
if /i "%1"=="lint-md" set lint_md=1&goto arg-ok
120122
if /i "%1"=="lint-md-build" set lint_md_build=1&goto arg-ok
@@ -730,10 +732,17 @@ goto lint-js
730732
goto lint-js
731733

732734
:lint-js
733-
if not defined lint_js goto lint-md-build
735+
if not defined lint_js goto lint-js-fix
734736
if not exist tools\eslint\node_modules\eslint goto no-lint
735737
echo running lint-js
736738
%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
739+
goto lint-js-fix
740+
741+
:lint-js-fix
742+
if not defined lint_js_fix goto lint-md-build
743+
if not exist tools\eslint\node_modules\eslint goto no-lint
744+
echo running lint-js-fix
745+
%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
737746
goto lint-md-build
738747

739748
:no-lint

0 commit comments

Comments
 (0)