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 MylesBorins committed Dec 12, 2017
1 parent b033d38 commit 46c1d99
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 @@ -1031,6 +1031,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 @@ -1177,6 +1184,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 46c1d99

Please sign in to comment.