From efcb34fa21c9cd298bf0e77e442e7a45a3b6c508 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Fri, 23 Jun 2023 09:08:45 +0200 Subject: [PATCH] try using 'pve-eslint' if it exists but fallback to 'eslint' otherwise Suggested-by: Thomas Lamprecht Signed-off-by: Dominik Csapak [T: move into www/manager Makefile directly] Signed-off-by: Thomas Lamprecht --- src/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index 7cff5dd..baa90ec 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,7 @@ include defines.mk +ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint) + SUBDIRS= css images proxmox-dark # bundle it for now from the libjs-marked debian package to avoid touching our proxies file mapper, @@ -110,14 +112,14 @@ all: $(SUBDIRS) set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i; done .lint-incremental: $(JSSRC) - eslint $? + $(ESLINT) $? touch "$@" .PHONY: lint check: lint - eslint --strict api-viewer/APIViewer.js + $(ESLINT) --strict api-viewer/APIViewer.js lint: $(JSSRC) - eslint --strict $(JSSRC) + $(ESLINT) --strict $(JSSRC) touch ".lint-incremental" BUILD_TIME=$(or $(SOURCE_DATE_EPOCH),$(shell date '+%s.%N'))