mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-10-04 05:48:46 +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= \
|
JSSRC= \
|
||||||
Utils.js \
|
Utils.js \
|
||||||
FilterProxy.js \
|
FilterProxy.js \
|
||||||
@ -106,7 +108,7 @@ OnlineHelpInfo.js: /usr/bin/asciidoc-pmg
|
|||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
||||||
.lint-incremental: $(JSSRC)
|
.lint-incremental: $(JSSRC)
|
||||||
eslint $?
|
$(ESLINT) $?
|
||||||
touch "$@"
|
touch "$@"
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
@ -114,7 +116,7 @@ lint: .lint-incremental
|
|||||||
|
|
||||||
.PHONY: check
|
.PHONY: check
|
||||||
check: $(JSSRC)
|
check: $(JSSRC)
|
||||||
eslint --strict $(JSSRC)
|
$(ESLINT) --strict $(JSSRC)
|
||||||
touch ".lint-incremental"
|
touch ".lint-incremental"
|
||||||
|
|
||||||
pmgmanagerlib.js: OnlineHelpInfo.js $(JSSRC)
|
pmgmanagerlib.js: OnlineHelpInfo.js $(JSSRC)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
include ../../defines.mk
|
||||||
|
|
||||||
# caution: order is important
|
# caution: order is important
|
||||||
MOBILESRC= \
|
MOBILESRC= \
|
||||||
@ -10,7 +11,7 @@ MOBILESRC= \
|
|||||||
app.js \
|
app.js \
|
||||||
|
|
||||||
lint: pmgmanagerlib-mobile.js
|
lint: pmgmanagerlib-mobile.js
|
||||||
eslint $^
|
$(ESLINT) $^
|
||||||
|
|
||||||
.PHONY: check
|
.PHONY: check
|
||||||
check: lint
|
check: lint
|
||||||
|
Loading…
Reference in New Issue
Block a user