From c15d821e0a5d543487dc06a099c0b9a338e5b50c Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 19 May 2021 16:56:50 +0200 Subject: [PATCH] enable eslint on build Signed-off-by: Thomas Lamprecht --- Makefile | 3 ++- www/Makefile | 4 ++++ www/manager6/Makefile | 10 ++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index be8cc56f..e23327d9 100644 --- a/Makefile +++ b/Makefile @@ -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} diff --git a/www/Makefile b/www/Makefile index 9691f1f0..07fd5703 100644 --- a/www/Makefile +++ b/www/Makefile @@ -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 diff --git a/www/manager6/Makefile b/www/manager6/Makefile index afed3283..506b5a4e 100644 --- a/www/manager6/Makefile +++ b/www/manager6/Makefile @@ -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 -- 2.39.2