Skip to content

Commit e2c0790

Browse files
committed
Apply Hongdown formatter to Markdown files
Add Hongdown as a dev dependency and apply consistent formatting across all Markdown documentation: - Standardize numbered list format (1. with two spaces) - Sort reference links alphabetically - Add blank lines between bullet points for readability - Fix missing code fence closures in docs/concepts/events.md and docs/concepts/message.md - Correct duplicate numbering in docs/deploy/self-hosting.md - Normalize nested list indentation in CHANGES.md - Add hongdown-disable comments for VitePress special syntax
1 parent 617515f commit e2c0790

File tree

24 files changed

+322
-232
lines changed

24 files changed

+322
-232
lines changed

.hongdown.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include = ["*.md", "**/*.md"]
2+
exclude = ["**/node_modules/**", "**/dist/**", "**/.git/**"]

AGENTS.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ Architecture
9393
### Build system
9494

9595
- Uses *tsdown* for cross-platform builds (Deno -> Node.js/npm)
96-
- Generates ESM (*dist/*.js*) and CommonJS (*dist/*.cjs*) outputs
97-
- Creates TypeScript definitions for both (*dist/*.d.ts*, *dist/*.d.cts*)
96+
- Generates ESM (_dist/\*.js_) and CommonJS (_dist/\*.cjs_) outputs
97+
- Creates TypeScript definitions for both (_dist/\*.d.ts_, _dist/\*.d.cts_)
9898
- Includes Temporal polyfill injection for Node.js compatibility
9999

100100
### Dual runtime support
@@ -130,22 +130,25 @@ and Node.js compatibility.
130130

131131
### When making changes
132132

133-
1. Run `deno task check` before committing to validate all aspects
134-
2. The build process (*tsdown*) generates dual outputs for both runtimes
135-
3. Tests should work in both Deno and Node.js environments
136-
4. *Update documentation*: New features must be documented in the *docs/*
133+
1. Run `deno task check` before committing to validate all aspects
134+
2. The build process (*tsdown*) generates dual outputs for both runtimes
135+
3. Tests should work in both Deno and Node.js environments
136+
4. *Update documentation*: New features must be documented in the *docs/*
137137
directory
138-
5. *Update changelog*: Any user-facing changes must be recorded in
138+
5. *Update changelog*: Any user-facing changes must be recorded in
139139
*CHANGES.md*
140140

141141
### Commit messages
142142

143143
- Do not use Conventional Commits (no `fix:`, `feat:`, etc. prefixes).
144144
Keep the first line under 50 characters when possible.
145+
145146
- Focus on *why* the change was made, not just *what* changed.
147+
146148
- When referencing issues or PRs, use permalink URLs instead of just
147149
numbers (e.g., `#123`). This preserves context if the repository
148150
is moved later.
151+
149152
- When listing items after a colon, add a blank line after the colon:
150153

151154
~~~~
@@ -249,6 +252,7 @@ Code style
249252
250253
- All exported APIs must have JSDoc comments describing their purpose,
251254
parameters, and return values.
255+
252256
- For APIs added in a specific version, include the `@since` tag with the
253257
version number:
254258
@@ -329,8 +333,8 @@ Code style
329333
330334
### Log messages
331335
332-
- This project uses [LogTape] for logging. Refer to the [LogTape LLM
333-
documentation] for detailed usage.
336+
- This project uses [LogTape] for logging. Refer to the
337+
[LogTape LLM documentation] for detailed usage.
334338
335339
- Use [structured logging] with LogTape instead of string interpolation:
336340
@@ -429,7 +433,9 @@ documentation:
429433
### Lists
430434
431435
- Use ` - ` (space-hyphen-two spaces) for unordered list items
436+
432437
- Indent nested items with 4 spaces
438+
433439
- Align continuation text with the item content:
434440
435441
~~~~
@@ -441,6 +447,7 @@ documentation:
441447
### Code blocks
442448
443449
- Use four tildes (`~~~~`) for code fences instead of backticks
450+
444451
- Always specify the language identifier:
445452
446453
~~~~~
@@ -461,6 +468,7 @@ documentation:
461468
462469
- Use reference-style links placed at the *end of each section*
463470
(not at document end)
471+
464472
- Format reference links with consistent spacing:
465473
466474
~~~~

CHANGES.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ Released on August 8, 2025.
123123
fix [CVE-2025-54888] that addresses an authentication bypass
124124
vulnerability allowing actor impersonation. [[CVE-2025-54888]]
125125

126+
[CVE-2025-54888]: https://github.com/fedify-dev/fedify/security/advisories/GHSA-6jcc-xgcr-q3h4
127+
126128

127129
Version 0.2.1
128130
-------------
@@ -145,7 +147,7 @@ Released on April 21, 2025.
145147
- Added custom emoji support.
146148

147149
- The return type of `Text.getTags()` method became
148-
`AsyncIterable<Link | Object>` (was `AsyncIterable<Link>`).
150+
`AsyncIterable<Link | Object>` (was `AsyncIterable<Link>`).
149151
- Added `Bot.addCustomEmojis()` method.
150152
- Added `CustomEmojiText` class.
151153
- Added `customEmoji()` function.
@@ -225,8 +227,6 @@ Released on August 8, 2025.
225227
fix [CVE-2025-54888] that addresses an authentication bypass
226228
vulnerability allowing actor impersonation. [[CVE-2025-54888]]
227229

228-
[CVE-2025-54888]: https://github.com/fedify-dev/fedify/security/advisories/GHSA-6jcc-xgcr-q3h4
229-
230230

231231
Version 0.1.1
232232
-------------

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Reporting a vulnerability
1414
-------------------------
1515

1616
If you think you have found a security issue, please *do not* open a public
17-
issue. Instead, please open a private vulnerability report by [creating a new
18-
draft security advisory][1].
17+
issue. Instead, please open a private vulnerability report by
18+
[creating a new draft security advisory][1].
1919

2020
We will review your report and respond within 48 hours.
2121

deno.json

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
2-
"workspace": [
3-
"packages/*",
4-
"examples/*"
5-
],
6-
"unstable": [
7-
"kv",
8-
"temporal"
9-
],
2+
"workspace": ["packages/*", "examples/*"],
3+
"unstable": ["kv", "temporal"],
104
"imports": {
115
"@fedify/fedify": "jsr:@fedify/fedify@1.10.0",
126
"@logtape/logtape": "jsr:@logtape/logtape@^1.3.5",
@@ -27,29 +21,21 @@
2721
"src/css"
2822
],
2923
"fmt": {
30-
"exclude": [
31-
"*.md",
32-
"*.yaml",
33-
"*.yml"
34-
]
24+
"exclude": ["*.md", "*.yaml", "*.yml"]
3525
},
3626
"tasks": {
27+
"hongdown": "deno run -A npm:hongdown@^0.1.0-dev.37",
3728
"check": {
38-
"dependencies": [
39-
"check-versions"
40-
],
41-
"command": "deno check && deno lint && deno fmt --check && deno publish --dry-run --allow-dirty"
29+
"dependencies": ["check-versions"],
30+
"command": "deno check && deno lint && deno fmt --check && deno task hongdown --check && deno publish --dry-run --allow-dirty"
4231
},
4332
"check-versions": "deno run --allow-read --allow-write scripts/check_versions.ts",
33+
"fmt": "deno fmt && deno task hongdown --write",
4434
"install": "deno cache packages/*/src/*.ts && pnpm install",
4535
"test": "deno test --allow-read --allow-write --allow-env --allow-net=hollo.social --parallel",
4636
"test:node": "pnpm install && pnpm run -r test",
4737
"test-all": {
48-
"dependencies": [
49-
"check",
50-
"test",
51-
"test:node"
52-
]
38+
"dependencies": ["check", "test", "test:node"]
5339
},
5440
"coverage": "deno task test --coverage --clean && deno coverage --html",
5541
"hooks:install": "deno run --allow-read=deno.json,.git/hooks/ --allow-write=.git/hooks/ jsr:@hongminhee/deno-task-hooks",

deno.lock

Lines changed: 71 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ description: >-
33
The changelog contains a list of changes made to BotKit. It is useful for
44
developers who want to know what has changed in the library.
55
---
6+
67
<!--@include: ../CHANGES.md-->

docs/concepts/bot.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ On production, you probably want to use one of the following drivers:
6868
Or if you want to implement your own custom key–value store,
6969
[that is also possible!][2]
7070

71-
[1]: https://fedify.dev/manual/kv
7271
[`MemoryKvStore`]: https://fedify.dev/manual/kv#memorykvstore
7372
[`DenoKvStore`]: https://fedify.dev/manual/kv#denokvstore-deno-only
7473
[`RedisKvStore`]: https://fedify.dev/manual/kv#rediskvstore
7574
[`PostgresKvStore`]: https://fedify.dev/manual/kv#postgreskvstore
75+
[1]: https://fedify.dev/manual/kv
7676
[2]: https://fedify.dev/manual/kv#implementing-a-custom-kvstore
7777

7878

@@ -219,11 +219,11 @@ Or if you want to implement your own custom message queue,
219219
> recommend to configure the `~CreateBotOptions.queue` to make your bot
220220
> performant and scalable.
221221
222-
[3]: https://fedify.dev/manual/mq
223222
[`InProcessMessageQueue`]: https://fedify.dev/manual/mq#inprocessmessagequeue
224223
[`DenoKvMessageQueue`]: https://fedify.dev/manual/mq#denokvmessagequeue-deno-only
225224
[`RedisMessageQueue`]: https://fedify.dev/manual/mq#redismessagequeue
226225
[`PostgresMessageQueue`]: https://fedify.dev/manual/mq#postgresmessagequeue
226+
[3]: https://fedify.dev/manual/mq
227227
[4]: https://fedify.dev/manual/mq#implementing-a-custom-messagequeue
228228

229229
### `~CreateBotOptions.software`
@@ -243,7 +243,7 @@ It consists of the following properties:
243243
~~~~ typescript twoslash
244244
// @noErrors: 2345
245245
import { createBot, parseSemVer } from "@fedify/botkit";
246-
246+
247247
const bot = createBot<void>({
248248
// Omitted other options for brevity
249249
software: {
@@ -496,7 +496,7 @@ https://8eba96f5416581.lhr.life/
496496
Press ^C to close the tunnel.
497497
~~~~
498498

499-
[^1]: You need to install the `fedify` command first. [There are multiple ways
499+
[^1]: You need to install the `fedify` command first. [There are multiple ways
500500
to install it.][5]
501501
[^2]: The hostname will be different in your case.
502502

docs/concepts/events.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ document.
207207
> bot.onReply = async (session, reply) => {
208208
> await reply.reply(text`Thanks for your reply, ${reply.actor}!`);
209209
> };
210-
>
210+
>
211211
> bot.onMention = async (session, message) => {
212212
> if (message.replyTarget == null) { // [!code highlight]
213213
> await message.reply(text`You called me, ${message.actor}?`);
@@ -225,12 +225,13 @@ document.
225225
> bot.onMention = async (session, message) => {
226226
> await message.reply(text`You called me, ${message.actor}?`);
227227
> };
228-
>
228+
>
229229
> bot.onReply = async (session, reply) => {
230230
> if (!reply.mentions.some(m => m.id?.href === session.actorId.href)) {
231231
> await reply.reply(text`Thanks for your reply, ${reply.actor}!`);
232232
> }
233233
> };
234+
> ~~~~
234235
235236
236237
Quote
@@ -306,7 +307,7 @@ bot.onMessage = async (session, message) => {
306307
> bot.onMention = async (session, message) => {
307308
> await message.reply(text`You called me, ${message.actor}?`);
308309
> };
309-
>
310+
>
310311
> bot.onMessage = async (session, message) => {
311312
> if (message.mentions.some(m => m.id?.href === session.actorId.href)) {
312313
> return;

0 commit comments

Comments
 (0)