enable eslint on build

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-05-19 16:56:50 +02:00
parent 00c3ac53c7
commit c15d821e0a
3 changed files with 14 additions and 3 deletions

View File

@ -20,9 +20,10 @@ all: ${SUBDIRS}
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i; done
.PHONY: check
check: bin test
check: bin test www
${MAKE} -C bin check
${MAKE} -C test check
${MAKE} -C www check
.PHONY: dinstall
dinstall: ${DEB}

View File

@ -12,6 +12,10 @@ install:
install -m 0644 u2f-api.js ${WWWJSDIR}
install -m 0644 qrcode.min.js ${WWWJSDIR}
.PHONY: check
check:
${MAKE} -C manager6 $@
.PHONY: clean
clean:
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done

View File

@ -276,10 +276,16 @@ JSSRC= \
all: pvemanagerlib.js
.lint-incremental: ${JSSRC}
eslint $?
touch "$@"
.PHONY: lint check
check: lint
lint: ${JSSRC}
eslint --strict ${JSSRC}
pvemanagerlib.js: OnlineHelpInfo.js ${JSSRC}
pvemanagerlib.js: .lint-incremental OnlineHelpInfo.js ${JSSRC}
cat OnlineHelpInfo.js ${JSSRC} >$@.tmp
mv $@.tmp $@
@ -295,7 +301,7 @@ install: pvemanagerlib.js
.PHONY: clean
clean:
find . -name '*~' -exec rm {} ';'
rm -rf pvemanagerlib.js OnlineHelpInfo.js
rm -rf pvemanagerlib.js OnlineHelpInfo.js .lint-incremental