Pull request: scripts: imp client linting

Merge in DNS/adguard-home from imp-hook to master

Squashed commit of the following:

commit f09a3ea2c0299b3ecb39b62d83b65919e425e591
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Jan 28 13:49:03 2021 +0300

    scripts: imp client linting
This commit is contained in:
Ainar Garipov 2021-01-28 14:02:38 +03:00
parent a76fb2cd52
commit 154c9c1c26
2 changed files with 13 additions and 6 deletions

View File

@ -68,11 +68,13 @@ js-build:
js-deps: js-deps:
$(NPM) $(NPM_FLAGS) ci $(NPM) $(NPM_FLAGS) ci
$(YARN) $(YARN_FLAGS) install $(YARN) $(YARN_FLAGS) install
js-lint:
$(NPM) $(NPM_FLAGS) run lint # TODO(a.garipov): Remove the legacy client tasks support once the new
$(YARN) $(YARN_FLAGS) lint # client is done and the old one is removed.
js-test: js-lint: ; $(NPM) $(NPM_FLAGS) run lint
$(NPM) $(NPM_FLAGS) run test js-test: ; $(NPM) $(NPM_FLAGS) run test
js-beta-lint: ; $(YARN) $(YARN_FLAGS) lint
js-beta-test: ; # TODO(v.abdulmyanov): Add tests for the new client.
go-build: ; $(ENV) "$(SHELL)" ./scripts/make/go-build.sh go-build: ; $(ENV) "$(SHELL)" ./scripts/make/go-build.sh
go-deps: ; $(ENV) "$(SHELL)" ./scripts/make/go-deps.sh go-deps: ; $(ENV) "$(SHELL)" ./scripts/make/go-deps.sh

View File

@ -2,11 +2,16 @@
set -e -f -u set -e -f -u
if [ "$(git diff --cached --name-only -- '*.js')" ] if [ "$(git diff --cached --name-only -- 'client/*.js')" ]
then then
make js-lint js-test make js-lint js-test
fi fi
if [ "$(git diff --cached --name-only -- 'client2/*.js' 'client2/*.ts' 'client2/*.tsx')" ]
then
make js-beta-lint js-beta-test
fi
if [ "$(git diff --cached --name-only -- '*.go' 'go.mod')" ] if [ "$(git diff --cached --name-only -- '*.go' 'go.mod')" ]
then then
make go-lint go-test make go-lint go-test