mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-04-28 12:39:16 +00:00
try using 'pve-eslint' if it exists
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>
This commit is contained in:
parent
02b57c1cda
commit
c3209035f1
1
defines.mk
Normal file
1
defines.mk
Normal file
@ -0,0 +1 @@
|
||||
ESLINT ?= $(if $(shell command -v pve-eslint), pve-eslint, eslint)
|
@ -1,3 +1,5 @@
|
||||
include ../defines.mk
|
||||
|
||||
JSSRC= \
|
||||
Utils.js \
|
||||
FilterProxy.js \
|
||||
@ -106,7 +108,7 @@ OnlineHelpInfo.js: /usr/bin/asciidoc-pmg
|
||||
mv $@.tmp $@
|
||||
|
||||
.lint-incremental: $(JSSRC)
|
||||
eslint $?
|
||||
$(ESLINT) $?
|
||||
touch "$@"
|
||||
|
||||
.PHONY: lint
|
||||
@ -114,7 +116,7 @@ lint: .lint-incremental
|
||||
|
||||
.PHONY: check
|
||||
check: $(JSSRC)
|
||||
eslint --strict $(JSSRC)
|
||||
$(ESLINT) --strict $(JSSRC)
|
||||
touch ".lint-incremental"
|
||||
|
||||
pmgmanagerlib.js: OnlineHelpInfo.js $(JSSRC)
|
||||
|
@ -1,3 +1,4 @@
|
||||
include ../../defines.mk
|
||||
|
||||
# caution: order is important
|
||||
MOBILESRC= \
|
||||
@ -10,7 +11,7 @@ MOBILESRC= \
|
||||
app.js \
|
||||
|
||||
lint: pmgmanagerlib-mobile.js
|
||||
eslint $^
|
||||
$(ESLINT) $^
|
||||
|
||||
.PHONY: check
|
||||
check: lint
|
||||
|
Loading…
Reference in New Issue
Block a user