Skip to content

Commit 337d2b9

Browse files
joyeecheunggibfahn
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 74d5e6b commit 337d2b9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,13 @@ LINT_JS_CMD = tools/eslint/bin/eslint.js --cache \
10361036
--rulesdir=tools/eslint-rules --ext=.js,.mjs,.md \
10371037
$(LINT_JS_TARGETS)
10381038

1039+
lint-js-fix:
1040+
@if [ -x $(NODE) ]; then \
1041+
$(NODE) $(LINT_JS_CMD) --fix; \
1042+
else \
1043+
node $(LINT_JS_CMD) --fix; \
1044+
fi
1045+
10391046
lint-js:
10401047
@echo "Running JS linter..."
10411048
@if [ -x $(NODE) ]; then \
@@ -1182,6 +1189,7 @@ lint-clean:
11821189
lint-cpp \
11831190
lint-js \
11841191
lint-js-ci \
1192+
lint-js-fix \
11851193
list-gtests \
11861194
lint-md \
11871195
lint-md-build \

0 commit comments

Comments
 (0)