-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: support lint-js-fix
in vcbuild.bat
#53046
Conversation
cc @nodejs/platform-windows |
Hey @RedYetiDev, the labels you created should be called from other command in order to be executed. Feel free to use the patch I'm sending. Another thing, this is not as important, I think From e45abb7e84c32d7403a196303e406ed775580261 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=BCseyin=20A=C3=A7acak?= <huseyin@janeasystems.com>
Date: Mon, 20 May 2024 14:24:40 +0300
Subject: [PATCH 1/1] build: fix lint-md-fix and lint-js-fix
---
vcbuild.bat | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/vcbuild.bat b/vcbuild.bat
index f07711fab7..1b71db935d 100644
--- a/vcbuild.bat
+++ b/vcbuild.bat
@@ -707,11 +707,11 @@ 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\node_modules\eslint goto no-lint
echo running lint-js
%node_exe% tools\node_modules\eslint\bin\eslint.js --cache --max-warnings=0 --report-unused-disable-directives --rule "linebreak-style: 0" .eslintrc.js benchmark doc lib test tools
-goto lint-md-build
+goto lint-js-fix
:lint-js-fix
if not defined lint_js_fix goto lint-md-build
@@ -731,7 +731,7 @@ echo "Deprecated no-op target 'lint_md_build'"
goto lint-md
:lint-md
-if not defined lint_md goto format-md
+if not defined lint_md goto lint-md-fix
echo Running Markdown linter on docs...
SETLOCAL ENABLEDELAYEDEXPANSION
set lint_md_files=
@@ -742,7 +742,7 @@ for /D %%D IN (doc\*) do (
)
%node_exe% tools\lint-md\lint-md.mjs %lint_md_files%
ENDLOCAL
-goto format-md
+goto lint-md-fix
:lint-md-fix
if not defined lint_md_fix goto format-md
--
2.43.0.windows.1 |
I disagree, there are times that people want to lint without fixes |
That won't happen, as there can only be one |
Theoretically, if you call The patch file I provided enables the 2 new commands. Running |
Good to know, thanks (I'm not a batch file expert) |
I've made your suggestions. Sorry I brushed your comment off initially, I'm not a batch file expert and I didn't quite understand how |
No problem, glad I could help. |
lint-md-fix
and lint-js-fix
in vcbuild.bat
lint-js-fix
in vcbuild.bat
To summarize, I darn goofed and |
Could someone with a Windows machine validate that this works so this can land? |
The script is being called correctly, so this PR is good. But I'm getting an error (which is not related to this PR) that is:
Any recommendations on what to do here? |
@H4ad |
Commit Queue failed- Loading data for nodejs/node/pull/53046 ✔ Done loading data for nodejs/node/pull/53046 ----------------------------------- PR info ------------------------------------ Title build: support `lint-js-fix` in `vcbuild.bat` (#53046) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch RedYetiDev:patch-32 -> nodejs:main Labels windows, build, author ready, needs-ci Commits 4 - build: support `lint-md-fix` and `lint-js-fix` in `vcbuild.bat` - Update vcbuild.bat - Update vcbuild.bat - Update vcbuild.bat Committers 1 - GitHub PR-URL: https://github.com/nodejs/node/pull/53046 Reviewed-By: Yagiz Nizipli Reviewed-By: Moshe Atlow Reviewed-By: Vinícius Lourenço Claro Cardoso ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/53046 Reviewed-By: Yagiz Nizipli Reviewed-By: Moshe Atlow Reviewed-By: Vinícius Lourenço Claro Cardoso -------------------------------------------------------------------------------- ℹ This PR was created on Sat, 18 May 2024 13:18:20 GMT ✔ Approvals: 3 ✔ - Yagiz Nizipli (@anonrig): https://github.com/nodejs/node/pull/53046#pullrequestreview-2064964306 ✔ - Moshe Atlow (@MoLow) (TSC): https://github.com/nodejs/node/pull/53046#pullrequestreview-2065008304 ✔ - Vinícius Lourenço Claro Cardoso (@H4ad): https://github.com/nodejs/node/pull/53046#pullrequestreview-2073766737 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2024-05-19T07:10:15Z: https://ci.nodejs.org/job/node-test-pull-request/59298/ ⚠ Commits were pushed after the last Full PR CI run: ⚠ - Update vcbuild.bat ⚠ - Update vcbuild.bat - Querying data for job/node-test-pull-request/59298/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/9208503129 |
Nothing more sad than a green CI and a conflict, @RedYetiDev can you rebase? |
Fingers crossed nothing broke |
@RedYetiDev can you please rebase to get rid of the merge commit that the CI is choking on? |
f8abafc
to
72cf866
Compare
😌 Rebase complete |
This needs another rebase. |
@aduh95 done :-) |
The merge conflicts won't go away :/, I might need to open a new PR. |
This PR adds support for
lint-js-fix
in thevcbuild.bat
file.