try using 'pve-eslint' if it exists

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>
This commit is contained in:
Dominik Csapak 2023-06-23 09:08:44 +02:00 committed by Thomas Lamprecht
parent 6d727f81c8
commit 45c2099cbd

View File

@ -1,5 +1,7 @@
include ../../defines.mk
ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint)
JSSRC= \
Parser.js \
StateProvider.js \
@ -314,13 +316,13 @@ WIDGETKIT=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
all:
.lint-incremental: $(JSSRC)
eslint $?
$(ESLINT) $?
touch "$@"
.PHONY: lint
check: lint
lint: $(JSSRC)
eslint --strict $(JSSRC)
$(ESLINT) --strict $(JSSRC)
touch ".lint-incremental"
pvemanagerlib.js: .lint-incremental OnlineHelpInfo.js $(JSSRC)