Skip to content

Commit 46c1d99

Browse files
joyeecheungMylesBorins
authored andcommitted
build: add make lint-js-fix
PR-URL: #17283 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent b033d38 commit 46c1d99

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,13 @@ LINT_JS_CMD = tools/eslint/bin/eslint.js --cache \
10311031
--rulesdir=tools/eslint-rules --ext=.js,.mjs,.md \
10321032
$(LINT_JS_TARGETS)
10331033

1034+
lint-js-fix:
1035+
@if [ -x $(NODE) ]; then \
1036+
$(NODE) $(LINT_JS_CMD) --fix; \
1037+
else \
1038+
node $(LINT_JS_CMD) --fix; \
1039+
fi
1040+
10341041
lint-js:
10351042
@echo "Running JS linter..."
10361043
@if [ -x $(NODE) ]; then \
@@ -1177,6 +1184,7 @@ lint-clean:
11771184
lint-cpp \
11781185
lint-js \
11791186
lint-js-ci \
1187+
lint-js-fix \
11801188
list-gtests \
11811189
lint-md \
11821190
lint-md-build \

0 commit comments

Comments
 (0)