Add UI lint instructions and accompanying targets to Makefile (#3315)

This commit is contained in:
jannfis 2020-03-30 22:21:27 +02:00 committed by GitHub
parent c71bfc62ba
commit a7f6866344
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

@ -278,6 +278,14 @@ lint-local:
# See https://github.com/golangci/golangci-lint#memory-usage-of-golangci-lint
GOGC=100 golangci-lint run --fix --verbose
.PHONY: lint-ui
lint-ui:
$(call run-in-test-client,make lint-ui-local)
.PHONY: lint-ui-local
lint-ui-local:
cd ui && yarn lint
# Build all Go code
.PHONY: build
build:

View file

@ -198,6 +198,11 @@ The Linter might make some automatic changes to your code, such as indentation f
* Finally, after the Linter reports no errors anymore, run `git status` or `git diff` to check for any changes made automatically by Lint
* If there were automatic changes, commit them to your local branch
If you touched UI code, you should also run the Yarn linter on it:
* Run `make lint-ui`
* Fix any of the errors reported by it
## Setting up a local toolchain
For development, you can either use the fully virtualized toolchain provided as Docker images, or you can set up the toolchain on your local development machine. Due to the dynamic nature of requirements, you might want to stay with the virtualized environment.