build: add make lint-js-fix
PR-URL: https://github.com/nodejs/node/pull/17283 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
parent
6d1f8a31e4
commit
7dc24062fc
8
Makefile
8
Makefile
@ -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 \
|
||||
@ -1177,6 +1184,7 @@ lint-clean:
|
||||
lint-cpp \
|
||||
lint-js \
|
||||
lint-js-ci \
|
||||
lint-js-fix \
|
||||
list-gtests \
|
||||
lint-md \
|
||||
lint-md-build \
|
||||
|
Loading…
x
Reference in New Issue
Block a user