Skip to content

Commit

Permalink
build: add make lint-js-fix
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
joyeecheung authored and gibfahn committed Dec 20, 2017
1 parent 74d5e6b commit 337d2b9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,13 @@ LINT_JS_CMD = tools/eslint/bin/eslint.js --cache \
--rulesdir=tools/eslint-rules --ext=.js,.mjs,.md \
$(LINT_JS_TARGETS)

lint-js-fix:
@if [ -x $(NODE) ]; then \
$(NODE) $(LINT_JS_CMD) --fix; \
else \
node $(LINT_JS_CMD) --fix; \
fi

lint-js:
@echo "Running JS linter..."
@if [ -x $(NODE) ]; then \
Expand Down Expand Up @@ -1182,6 +1189,7 @@ lint-clean:
lint-cpp \
lint-js \
lint-js-ci \
lint-js-fix \
list-gtests \
lint-md \
lint-md-build \
Expand Down

0 comments on commit 337d2b9

Please sign in to comment.