but fallback to 'eslint' otherwise
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[T: move into www/manager Makefile directly ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint)
+
JSSRC= \
Parser.js \
StateProvider.js \
JSSRC= \
Parser.js \
StateProvider.js \
all:
.lint-incremental: $(JSSRC)
all:
.lint-incremental: $(JSSRC)
touch "$@"
.PHONY: lint
check: lint
lint: $(JSSRC)
touch "$@"
.PHONY: lint
check: lint
lint: $(JSSRC)
- eslint --strict $(JSSRC)
+ $(ESLINT) --strict $(JSSRC)
touch ".lint-incremental"
pvemanagerlib.js: .lint-incremental OnlineHelpInfo.js $(JSSRC)
touch ".lint-incremental"
pvemanagerlib.js: .lint-incremental OnlineHelpInfo.js $(JSSRC)