@@ -414,7 +414,7 @@ BOLD := $(shell tput bold 2>/dev/null)
414414GREEN :=$(shell tput setaf 2 2>/dev/null)
415415RESET :=$(shell tput sgr0 2>/dev/null)
416416
417- fmt : fmt/ts fmt/go fmt/terraform fmt/shfmt fmt/prettier
417+ fmt : fmt/ts fmt/go fmt/terraform fmt/shfmt fmt/biome fmt/markdown
418418.PHONY : fmt
419419
420420fmt/go :
@@ -438,15 +438,16 @@ else
438438endif
439439.PHONY : fmt/ts
440440
441- fmt/prettier : .prettierignore
442- echo " $( GREEN) ==>$( RESET) $( BOLD) fmt/prettier$( RESET) "
441+ fmt/biome :
442+ echo " $( GREEN) ==>$( RESET) $( BOLD) fmt/biome$( RESET) "
443+ cd site
443444# Avoid writing files in CI to reduce file write activity
444445ifdef CI
445446pnpm run format:check
446447else
447448pnpm run format
448449endif
449- .PHONY : fmt/prettier
450+ .PHONY : fmt/biome
450451
451452fmt/terraform :$(wildcard * .tf)
452453echo " $( GREEN) ==>$( RESET) $( BOLD) fmt/terraform$( RESET) "
@@ -463,7 +464,13 @@ else
463464endif
464465.PHONY : fmt/shfmt
465466
466- lint : lint/shellcheck lint/go lint/ts lint/examples lint/helm lint/site-icons
467+ fmt/markdown :
468+ echo " $( GREEN) ==>$( RESET) $( BOLD) fmt/markdown$( RESET) "
469+ ./scripts/pnpm_install.sh
470+ pnpm format-docs
471+ .PHONY : fmt/markdown
472+
473+ lint : lint/shellcheck lint/go lint/ts lint/examples lint/helm lint/site-icons lint/markdown
467474.PHONY : lint
468475
469476lint/site-icons :
@@ -497,6 +504,11 @@ lint/helm:
497504make lint
498505.PHONY : lint/helm
499506
507+ lint/markdown :
508+ ./scripts/pnpm_install.sh
509+ pnpm lint-docs
510+ .PHONY : lint/markdown
511+
500512# All files generated by the database should be added here, and this can be used
501513# as a target for jobs that need to run after the database is generated.
502514DB_GEN_FILES :=\
@@ -530,8 +542,6 @@ GEN_FILES := \
530542docs/reference/cli/index.md\
531543docs/admin/security/audit-logs.md\
532544coderd/apidoc/swagger.json\
533- .prettierignore.include\
534- .prettierignore\
535545provisioner/terraform/testdata/version\
536546site/e2e/provisionerGenerated.ts\
537547site/src/theme/icons.json\
@@ -566,8 +576,6 @@ gen/mark-fresh:
566576docs/reference/cli/index.md\
567577docs/admin/security/audit-logs.md\
568578coderd/apidoc/swagger.json\
569- .prettierignore.include\
570- .prettierignore\
571579site/e2e/provisionerGenerated.ts\
572580site/src/theme/icons.json\
573581examples/examples.gen.json\
@@ -648,6 +656,9 @@ vpn/vpn.pb.go: vpn/vpn.proto
648656site/src/api/typesGenerated.ts :$(wildcard scripts/apitypings/* ) $(shell find ./codersdk$(FIND_EXCLUSIONS ) -type f -name '* .go')
649657# -C sets the directory for the go run command
650658go run -C ./scripts/apitypings main.go> $@
659+ cd site
660+ ../scripts/pnpm_install.sh
661+ pnpmexec biome format --write src/api/typesGenerated.ts
651662
652663site/e2e/provisionerGenerated.ts : provisionerd/proto/provisionerd.pb.go provisionersdk/proto/provisioner.pb.go
653664cd site
@@ -656,8 +667,9 @@ site/e2e/provisionerGenerated.ts: provisionerd/proto/provisionerd.pb.go provisio
656667
657668site/src/theme/icons.json :$(wildcard scripts/gensite/* ) $(wildcard site/static/icon/* )
658669go run ./scripts/gensite/ -icons" $@ "
659- ./scripts/pnpm_install.sh
660- pnpm -C site/exec biome format --write src/theme/icons.json
670+ cd site
671+ ../scripts/pnpm_install.sh
672+ pnpmexec biome format --write src/theme/icons.json
661673
662674examples/examples.gen.json : scripts/examplegen/main.go examples/examples.go$(shell find ./examples/templates)
663675go run ./scripts/examplegen/main.go> examples/examples.gen.json
@@ -676,29 +688,45 @@ codersdk/rbacresources_gen.go: scripts/typegen/codersdk.gotmpl scripts/typegen/m
676688
677689site/src/api/rbacresourcesGenerated.ts : scripts/typegen/codersdk.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go
678690go run scripts/typegen/main.go rbac typescript> " $@ "
691+ cd site
692+ ../scripts/pnpm_install.sh
693+ pnpmexec biome format --write src/api/rbacresourcesGenerated.ts
679694
680695site/src/api/countriesGenerated.ts : scripts/typegen/countries.tstmpl scripts/typegen/main.go codersdk/countries.go
681696go run scripts/typegen/main.go countries> " $@ "
697+ cd site
698+ ../scripts/pnpm_install.sh
699+ pnpmexec biome format --write src/api/countriesGenerated.ts
682700
683701docs/admin/integrations/prometheus.md : scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics
684702go run scripts/metricsdocgen/main.go
685703./scripts/pnpm_install.sh
686- pnpmexec prettier --write ./docs/admin/integrations/prometheus.md
704+ pnpmexec markdownlint-cli2 --fix ./docs/admin/integrations/prometheus.md
705+ pnpmexec markdown-table-formatter ./docs/admin/integrations/prometheus.md
687706
688707docs/reference/cli/index.md : scripts/clidocgen/main.go examples/examples.gen.json$(GO_SRC_FILES )
689708CI=true BASE_PATH=" ." go run ./scripts/clidocgen
690709./scripts/pnpm_install.sh
691- pnpmexec prettier --write ./docs/reference/cli/index.md ./docs/reference/cli/* .md ./docs/manifest.json
710+ pnpmexec markdownlint-cli2 --fix ./docs/reference/cli/* .md
711+ pnpmexec markdown-table-formatter ./docs/reference/cli/* .md
712+ cd site
713+ ../scripts/pnpm_install.sh
714+ pnpmexec biome format --write ../docs/manifest.json
692715
693716docs/admin/security/audit-logs.md : coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go
694717go run scripts/auditdocgen/main.go
695718./scripts/pnpm_install.sh
696- pnpmexec prettier --write ./docs/admin/security/audit-logs.md
719+ pnpmexec markdownlint-cli2 --fix ./docs/admin/security/audit-logs.md
720+ pnpmexec markdown-table-formatter ./docs/admin/security/audit-logs.md
697721
698722coderd/apidoc/swagger.json :$(shell find ./scripts/apidocgen$(FIND_EXCLUSIONS ) -type f) $(wildcard coderd/* .go) $(wildcard enterprise/coderd/* .go) $(wildcard codersdk/* .go) $(wildcard enterprise/wsproxy/wsproxysdk/* .go) $(DB_GEN_FILES ) .swaggo docs/manifest.json coderd/rbac/object_gen.go
699723./scripts/apidocgen/generate.sh
700724./scripts/pnpm_install.sh
701- pnpmexec prettier --write ./docs/reference/api ./docs/manifest.json ./coderd/apidoc/swagger.json
725+ pnpmexec markdownlint-cli2 --fix ./docs/reference/api/* .md
726+ pnpmexec markdown-table-formatter ./docs/reference/api/* .md
727+ cd site
728+ ../scripts/pnpm_install.sh
729+ pnpmexec biome format --write ../docs/manifest.json ../coderd/apidoc/swagger.json
702730
703731update-golden-files :\
704732cli/testdata/.gen-golden\
@@ -769,15 +797,6 @@ provisioner/terraform/testdata/version:
769797fi
770798.PHONY : provisioner/terraform/testdata/version
771799
772- # Combine .gitignore with .prettierignore.include to generate .prettierignore.
773- .prettierignore : .gitignore .prettierignore.include
774- echo " # Code generated by Makefile ($^). DO NOT EDIT." > " $@ "
775- echo " " >> " $@ "
776- for f in $^; do
777- echo " #$$ {f}:" >> " $@ "
778- cat" $$ f" >> " $@ "
779- done
780-
781800test :
782801$(GIT_FLAGS ) gotestsum --format standard-quiet -- -v -short -count=1 ./...
783802.PHONY : test