but fallback to 'eslint' otherwise
introduce the defines.mk for this
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
--- /dev/null
+ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint)
+include ../defines.mk
+
JSSRC= \
Utils.js \
FilterProxy.js \
mv $@.tmp $@
.lint-incremental: $(JSSRC)
- eslint $?
+ $(ESLINT) $?
touch "$@"
.PHONY: lint
.PHONY: check
check: $(JSSRC)
- eslint --strict $(JSSRC)
+ $(ESLINT) --strict $(JSSRC)
touch ".lint-incremental"
pmgmanagerlib.js: OnlineHelpInfo.js $(JSSRC)
+include ../../defines.mk
# caution: order is important
MOBILESRC= \
app.js \
lint: pmgmanagerlib-mobile.js
- eslint $^
+ $(ESLINT) $^
.PHONY: check
check: lint