Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fcaa917

Browse files
committed
Integrate markdownlint and remove Prettier for docs
- Replace Prettier with markdownlint for documentation formatting. - Rename `docs-pr.yaml` to `docs-lint.yaml` for clarity. - Adjust `Makefile` to use `fmt/biome` instead of `fmt/prettier`. - Remove `.prettierignore` and `.prettierignore.include` files. - Apply markdownlint formatting across relevant documentation files.
1 parent b7331df commit fcaa917

File tree

212 files changed

+32142
-32533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+32142
-32533
lines changed

.github/workflows/docs-pr.yaml renamed to .github/workflows/docs-lint.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
files: "docs/**/*.md"
1818
files_ignore: "docs/reference/*.md"
1919
separator: ","
20-
- uses: DavidAnson/markdownlint-cli2-action@v18
20+
- name: lint
2121
if: steps.changed-files.outputs.any_changed == 'true'
22-
with:
23-
globs: ${{ steps.changed-files.outputs.all_changed_files }}
24-
separator: ","
25-
config: ".github/actions/docs/markdownlint-cli2/.markdownlint.json"
22+
run: |
23+
cd site
24+
../scripts/pnpm_install.sh
25+
pnpm exec markdownlint-cli2 --fix {{ steps.changed-files.outputs.all_changed_files }}

.prettierignore

Lines changed: 0 additions & 99 deletions
This file was deleted.

.prettierignore.include

Lines changed: 0 additions & 17 deletions
This file was deleted.

Makefile

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ BOLD := $(shell tput bold 2>/dev/null)
414414
GREEN := $(shell tput setaf 2 2>/dev/null)
415415
RESET := $(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
418418
.PHONY: fmt
419419

420420
fmt/go:
@@ -436,15 +436,16 @@ else
436436
endif
437437
.PHONY: fmt/ts
438438

439-
fmt/prettier: .prettierignore
440-
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/prettier$(RESET)"
439+
fmt/biome:
440+
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/biome$(RESET)"
441+
cd site
441442
# Avoid writing files in CI to reduce file write activity
442443
ifdef CI
443444
pnpm run format:check
444445
else
445446
pnpm run format
446447
endif
447-
.PHONY: fmt/prettier
448+
.PHONY: fmt/biome
448449

449450
fmt/terraform: $(wildcard *.tf)
450451
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/terraform$(RESET)"
@@ -461,7 +462,7 @@ else
461462
endif
462463
.PHONY: fmt/shfmt
463464

464-
lint: lint/shellcheck lint/go lint/ts lint/examples lint/helm lint/site-icons
465+
lint: lint/shellcheck lint/go lint/ts lint/examples lint/helm lint/site-icons lint/markdown
465466
.PHONY: lint
466467

467468
lint/site-icons:
@@ -495,6 +496,12 @@ lint/helm:
495496
make lint
496497
.PHONY: lint/helm
497498

499+
lint/markdown:
500+
cd site
501+
../scripts/pnpm_install.sh
502+
pnpm exec markdownlint-cli2 --fix ../docs/**/*.md
503+
.PHONY: lint/markdown
504+
498505
# All files generated by the database should be added here, and this can be used
499506
# as a target for jobs that need to run after the database is generated.
500507
DB_GEN_FILES := \
@@ -530,8 +537,6 @@ gen: \
530537
docs/reference/cli/index.md \
531538
docs/admin/security/audit-logs.md \
532539
coderd/apidoc/swagger.json \
533-
.prettierignore.include \
534-
.prettierignore \
535540
provisioner/terraform/testdata/version \
536541
site/e2e/provisionerGenerated.ts \
537542
site/src/theme/icons.json \
@@ -560,8 +565,6 @@ gen/mark-fresh:
560565
docs/reference/cli/index.md \
561566
docs/admin/security/audit-logs.md \
562567
coderd/apidoc/swagger.json \
563-
.prettierignore.include \
564-
.prettierignore \
565568
site/e2e/provisionerGenerated.ts \
566569
site/src/theme/icons.json \
567570
examples/examples.gen.json \
@@ -650,11 +653,15 @@ site/e2e/provisionerGenerated.ts: provisionerd/proto/provisionerd.pb.go provisio
650653

651654
site/src/theme/icons.json: $(wildcard scripts/gensite/*) $(wildcard site/static/icon/*)
652655
go run ./scripts/gensite/ -icons "$@"
653-
./scripts/pnpm_install.sh
654-
pnpm -C site/ exec biome format --write src/theme/icons.json
656+
cd site
657+
../scripts/pnpm_install.sh
658+
pnpm exec biome format --write src/theme/icons.json
655659

656660
examples/examples.gen.json: scripts/examplegen/main.go examples/examples.go $(shell find ./examples/templates)
657661
go run ./scripts/examplegen/main.go > examples/examples.gen.json
662+
cd site
663+
../scripts/pnpm_install.sh
664+
pnpm exec biome format --write examples/examples.gen.json
658665

659666
coderd/rbac/object_gen.go: scripts/typegen/rbacobject.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go
660667
go run scripts/typegen/main.go rbac object > coderd/rbac/object_gen.go
@@ -673,23 +680,29 @@ site/src/api/countriesGenerated.ts: scripts/typegen/countries.tstmpl scripts/typ
673680

674681
docs/admin/integrations/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics
675682
go run scripts/metricsdocgen/main.go
676-
./scripts/pnpm_install.sh
677-
pnpm exec prettier --write ./docs/admin/integrations/prometheus.md
683+
cd site
684+
../scripts/pnpm_install.sh
685+
pnpm exec markdownlint-cli2 --write ../docs/admin/integrations/prometheus.md
678686

679687
docs/reference/cli/index.md: scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES)
680688
CI=true BASE_PATH="." go run ./scripts/clidocgen
681-
./scripts/pnpm_install.sh
682-
pnpm exec prettier --write ./docs/reference/cli/index.md ./docs/reference/cli/*.md ./docs/manifest.json
689+
cd site
690+
../scripts/pnpm_install.sh
691+
pnpm exec markdownlint-cli2 --fix ../docs/reference/cli/index.md ../docs/reference/cli/*.md
692+
pnpm exec biome format --write ../docs/manifest.json
683693

684694
docs/admin/security/audit-logs.md: coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go
685695
go run scripts/auditdocgen/main.go
686-
./scripts/pnpm_install.sh
687-
pnpm exec prettier --write ./docs/admin/security/audit-logs.md
696+
cd site
697+
../scripts/pnpm_install.sh
698+
pnpm exec markdownlint-cli2 --fix ../docs/admin/security/audit-logs.md
688699

689700
coderd/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
690701
./scripts/apidocgen/generate.sh
691-
./scripts/pnpm_install.sh
692-
pnpm exec prettier --write ./docs/reference/api ./docs/manifest.json ./coderd/apidoc/swagger.json
702+
cd site
703+
../scripts/pnpm_install.sh
704+
pnpm exec markdownlint-cli2 --fix ../docs/reference/api
705+
pnpm exec biome format --write ../docs/manifest.json ../coderd/apidoc/swagger.json
693706

694707
update-golden-files: \
695708
cli/testdata/.gen-golden \
@@ -750,15 +763,6 @@ scripts/ci-report/testdata/.gen-golden: $(wildcard scripts/ci-report/testdata/*)
750763
go test ./scripts/ci-report -run=TestOutputMatchesGoldenFile -update
751764
touch "$@"
752765

753-
# Combine .gitignore with .prettierignore.include to generate .prettierignore.
754-
.prettierignore: .gitignore .prettierignore.include
755-
echo "# Code generated by Makefile ($^). DO NOT EDIT." > "$@"
756-
echo "" >> "$@"
757-
for f in $^; do
758-
echo "# $${f}:" >> "$@"
759-
cat "$$f" >> "$@"
760-
done
761-
762766
test:
763767
$(GIT_FLAGS) gotestsum --format standard-quiet -- -v -short -count=1 ./...
764768
.PHONY: test
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"coderd_insights_applications_usage_seconds[application_name=JetBrains,slug=,template_name=golden-template]": 60,
3-
"coderd_insights_applications_usage_seconds[application_name=Visual Studio Code,slug=,template_name=golden-template]": 60,
4-
"coderd_insights_applications_usage_seconds[application_name=Web Terminal,slug=,template_name=golden-template]": 0,
5-
"coderd_insights_applications_usage_seconds[application_name=SSH,slug=,template_name=golden-template]": 60,
6-
"coderd_insights_applications_usage_seconds[application_name=Golden Slug,slug=golden-slug,template_name=golden-template]": 180,
7-
"coderd_insights_parameters[parameter_name=first_parameter,parameter_type=string,parameter_value=Foobar,template_name=golden-template]": 1,
8-
"coderd_insights_parameters[parameter_name=first_parameter,parameter_type=string,parameter_value=Baz,template_name=golden-template]": 1,
9-
"coderd_insights_parameters[parameter_name=second_parameter,parameter_type=bool,parameter_value=true,template_name=golden-template]": 2,
10-
"coderd_insights_parameters[parameter_name=third_parameter,parameter_type=number,parameter_value=789,template_name=golden-template]": 1,
11-
"coderd_insights_parameters[parameter_name=third_parameter,parameter_type=number,parameter_value=999,template_name=golden-template]": 1,
12-
"coderd_insights_templates_active_users[template_name=golden-template]": 1
2+
"coderd_insights_applications_usage_seconds[application_name=JetBrains,slug=,template_name=golden-template]": 60,
3+
"coderd_insights_applications_usage_seconds[application_name=Visual Studio Code,slug=,template_name=golden-template]": 60,
4+
"coderd_insights_applications_usage_seconds[application_name=Web Terminal,slug=,template_name=golden-template]": 0,
5+
"coderd_insights_applications_usage_seconds[application_name=SSH,slug=,template_name=golden-template]": 60,
6+
"coderd_insights_applications_usage_seconds[application_name=Golden Slug,slug=golden-slug,template_name=golden-template]": 180,
7+
"coderd_insights_parameters[parameter_name=first_parameter,parameter_type=string,parameter_value=Foobar,template_name=golden-template]": 1,
8+
"coderd_insights_parameters[parameter_name=first_parameter,parameter_type=string,parameter_value=Baz,template_name=golden-template]": 1,
9+
"coderd_insights_parameters[parameter_name=second_parameter,parameter_type=bool,parameter_value=true,template_name=golden-template]": 2,
10+
"coderd_insights_parameters[parameter_name=third_parameter,parameter_type=number,parameter_value=789,template_name=golden-template]": 1,
11+
"coderd_insights_parameters[parameter_name=third_parameter,parameter_type=number,parameter_value=999,template_name=golden-template]": 1,
12+
"coderd_insights_templates_active_users[template_name=golden-template]": 1
1313
}
Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
2-
"testuser:workspace-1:example:coderd_agentstats_connection_count": 9,
3-
"testuser:workspace-1:example:coderd_agentstats_connection_median_latency_seconds": 8,
4-
"testuser:workspace-1:example:coderd_agentstats_rx_bytes": 9,
5-
"testuser:workspace-1:example:coderd_agentstats_session_count_jetbrains": 6,
6-
"testuser:workspace-1:example:coderd_agentstats_session_count_reconnecting_pty": 7,
7-
"testuser:workspace-1:example:coderd_agentstats_session_count_ssh": 8,
8-
"testuser:workspace-1:example:coderd_agentstats_session_count_vscode": 5,
9-
"testuser:workspace-1:example:coderd_agentstats_tx_bytes": 6,
10-
"testuser:workspace-2:example:coderd_agentstats_connection_count": 10,
11-
"testuser:workspace-2:example:coderd_agentstats_connection_median_latency_seconds": 10,
12-
"testuser:workspace-2:example:coderd_agentstats_rx_bytes": 15,
13-
"testuser:workspace-2:example:coderd_agentstats_session_count_jetbrains": 10,
14-
"testuser:workspace-2:example:coderd_agentstats_session_count_reconnecting_pty": 12,
15-
"testuser:workspace-2:example:coderd_agentstats_session_count_ssh": 14,
16-
"testuser:workspace-2:example:coderd_agentstats_session_count_vscode": 8,
17-
"testuser:workspace-2:example:coderd_agentstats_tx_bytes": 9,
18-
"testuser:workspace-3:example:coderd_agentstats_connection_count": 11,
19-
"testuser:workspace-3:example:coderd_agentstats_connection_median_latency_seconds": 12,
20-
"testuser:workspace-3:example:coderd_agentstats_rx_bytes": 21,
21-
"testuser:workspace-3:example:coderd_agentstats_session_count_jetbrains": 16,
22-
"testuser:workspace-3:example:coderd_agentstats_session_count_reconnecting_pty": 18,
23-
"testuser:workspace-3:example:coderd_agentstats_session_count_ssh": 20,
24-
"testuser:workspace-3:example:coderd_agentstats_session_count_vscode": 14,
25-
"testuser:workspace-3:example:coderd_agentstats_tx_bytes": 12
2+
"testuser:workspace-1:example:coderd_agentstats_connection_count": 9,
3+
"testuser:workspace-1:example:coderd_agentstats_connection_median_latency_seconds": 8,
4+
"testuser:workspace-1:example:coderd_agentstats_rx_bytes": 9,
5+
"testuser:workspace-1:example:coderd_agentstats_session_count_jetbrains": 6,
6+
"testuser:workspace-1:example:coderd_agentstats_session_count_reconnecting_pty": 7,
7+
"testuser:workspace-1:example:coderd_agentstats_session_count_ssh": 8,
8+
"testuser:workspace-1:example:coderd_agentstats_session_count_vscode": 5,
9+
"testuser:workspace-1:example:coderd_agentstats_tx_bytes": 6,
10+
"testuser:workspace-2:example:coderd_agentstats_connection_count": 10,
11+
"testuser:workspace-2:example:coderd_agentstats_connection_median_latency_seconds": 10,
12+
"testuser:workspace-2:example:coderd_agentstats_rx_bytes": 15,
13+
"testuser:workspace-2:example:coderd_agentstats_session_count_jetbrains": 10,
14+
"testuser:workspace-2:example:coderd_agentstats_session_count_reconnecting_pty": 12,
15+
"testuser:workspace-2:example:coderd_agentstats_session_count_ssh": 14,
16+
"testuser:workspace-2:example:coderd_agentstats_session_count_vscode": 8,
17+
"testuser:workspace-2:example:coderd_agentstats_tx_bytes": 9,
18+
"testuser:workspace-3:example:coderd_agentstats_connection_count": 11,
19+
"testuser:workspace-3:example:coderd_agentstats_connection_median_latency_seconds": 12,
20+
"testuser:workspace-3:example:coderd_agentstats_rx_bytes": 21,
21+
"testuser:workspace-3:example:coderd_agentstats_session_count_jetbrains": 16,
22+
"testuser:workspace-3:example:coderd_agentstats_session_count_reconnecting_pty": 18,
23+
"testuser:workspace-3:example:coderd_agentstats_session_count_ssh": 20,
24+
"testuser:workspace-3:example:coderd_agentstats_session_count_vscode": 14,
25+
"testuser:workspace-3:example:coderd_agentstats_tx_bytes": 12
2626
}

docs/changelogs/v2.1.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
![Last used](https://user-images.githubusercontent.com/22407953/262407146-06cded4e-684e-4cff-86b7-4388270e7d03.png)
88
> You can use `last_used_before` and `last_used_after` in the workspaces
99
> search with [RFC3339Nano](https://www.rfc-editor.org/rfc/rfc3339) datetime
10-
- Add `daily_cost`` to `coder ls` to show
10+
- Add `daily_cost`` to`coder ls` to show
1111
[quota](https://coder.com/docs/admin/quotas) consumption (#9200)
1212
(@ammario)
1313
- Added `coder_app` usage to template insights (#9138) (@mafredri)

docs/changelogs/v2.1.5.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
[display apps](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#nested-schema-for-display_apps)
1818
in your template, such as VS Code (Insiders), web terminal, SSH, etc. (#9100)
1919
(@sreya) To add VS Code insiders into your template, you can set:
20+
2021
```tf
2122
display_apps {
2223
vscode_insiders = true
2324
}
2425
```
26+
2527
![Add insiders](https://user-images.githubusercontent.com/4856196/263852602-94a5cb56-b7c3-48cb-928a-3b5e0f4e964b.png)
2628
- Create a workspace from any template version (#9471) (@aslilac)
2729
- Add DataDog Go tracer (#9411) (@ammario)

docs/changelogs/v2.5.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
### Documentation
9393

9494
- Align CODER_HTTP_ADDRESS with document (#10779) (@JounQin)
95-
- Migrate all deprecated `CODER_ADDRESS `to `CODER_HTTP_ADDRESS` (#10780) (@JounQin)
95+
- Migrate all deprecated `CODER_ADDRESS`to `CODER_HTTP_ADDRESS` (#10780) (@JounQin)
9696
- Add documentation for template update policies (experimental) (#10804) (@sreya)
9797
- Fix typo in additional-clusters.md (#10868) (@bpmct)
9898
- Update FE guide (#10942) (@BrunoQuaresma)

0 commit comments

Comments
 (0)