mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-05 06:13:37 +09:00
flake: format the tree with one treefmt
The pre-commit hooks kept their own list of formatters, so nixpkgs-fmt in a hook and nixfmt in the check disagreed the moment flake-checks moved. `nix fmt` is now built from the same treefmt module the formatting check is, and the hook and the Makefile both call it.
This commit is contained in:
@@ -50,7 +50,7 @@ test: check-deps $(GO_SOURCES) go.mod go.sum
|
||||
|
||||
# Formatting targets
|
||||
.PHONY: fmt
|
||||
fmt: fmt-go fmt-mdformat fmt-prettier
|
||||
fmt: fmt-go fmt-mdformat fmt-tree
|
||||
|
||||
.PHONY: fmt-go
|
||||
fmt-go: check-deps $(GO_SOURCES)
|
||||
@@ -63,10 +63,10 @@ fmt-mdformat: check-deps
|
||||
@echo "Formatting documentation..."
|
||||
mdformat docs/
|
||||
|
||||
.PHONY: fmt-prettier
|
||||
fmt-prettier: check-deps $(PRETTIER_SOURCES)
|
||||
@echo "Formatting markup and config files..."
|
||||
prettier --write '**/*.{ts,js,md,yaml,yml,sass,css,scss,html}'
|
||||
.PHONY: fmt-tree
|
||||
fmt-tree: check-deps $(PRETTIER_SOURCES)
|
||||
@echo "Formatting Nix, markup and config files..."
|
||||
nix fmt
|
||||
|
||||
# Linting targets
|
||||
.PHONY: lint
|
||||
|
||||
Reference in New Issue
Block a user