[pve-devel] [PATCH manager v3 1/1] try using 'pve-eslint' if it exists
Dominik Csapak
d.csapak at proxmox.com
Fri Jun 23 09:08:44 CEST 2023
but fallback to 'eslint' otherwise
Suggested-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
defines.mk | 2 ++
www/manager6/Makefile | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/defines.mk b/defines.mk
index 3a5792ad..811f3483 100644
--- a/defines.mk
+++ b/defines.mk
@@ -19,3 +19,5 @@ WWWTOUCHDIR=${WWWBASEDIR}/touch
WWWCSSDIR=${WWWBASEDIR}/css
WWWFONTSDIR=${WWWBASEDIR}/css/fonts
WWWJSDIR=${WWWBASEDIR}/js
+ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint)
+
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 2d884f4a..ff113aa2 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -314,13 +314,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)
--
2.30.2
More information about the pve-devel
mailing list