Use prettier to format other files
+ Add vscode settings to automatically use it.
This commit is contained in:
parent
b222541ea8
commit
4d40de58fc
6 changed files with 35 additions and 2 deletions
10
Makefile
10
Makefile
|
@ -55,6 +55,8 @@ help:
|
|||
@echo " make coverage-upload - Upload coverage results to codecov.io"
|
||||
@echo
|
||||
@echo "Lint/format:"
|
||||
@echo " make format - Run prettier on config files, docs, etc excluding the web app"
|
||||
@echo " make format-check - Run prettier on config files, docs, etc excluding the web app, but don't change anything"
|
||||
@echo " make fmt - Run 'go fmt'"
|
||||
@echo " make fmt-check - Run 'go fmt', but don't change anything"
|
||||
@echo " make vet - Run 'go vet'"
|
||||
|
@ -248,7 +250,7 @@ cli-build-results:
|
|||
|
||||
# Test/check targets
|
||||
|
||||
check: test web-format-check fmt-check vet web-lint lint staticcheck
|
||||
check: test format-check web-format-check fmt-check vet web-lint lint staticcheck
|
||||
|
||||
test: .PHONY
|
||||
go test $(shell go list ./... | grep -vE 'ntfy/(test|examples|tools)')
|
||||
|
@ -275,6 +277,12 @@ coverage-upload:
|
|||
|
||||
# Lint/formatting targets
|
||||
|
||||
format: web-deps
|
||||
./web/node_modules/.bin/prettier . --write
|
||||
|
||||
format-check: web-deps
|
||||
./web/node_modules/.bin/prettier . --check
|
||||
|
||||
fmt:
|
||||
gofmt -s -w .
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue