Skip to content

Commit ac64805

Browse files
authored
Migrate to Biome, use TypeDoc for API generation (#7)
1 parent a7587f7 commit ac64805

25 files changed

+3112
-2161
lines changed

.config/.markdownlint.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../.markdownlint.json",
3+
"MD051": false
4+
}

.config/typedoc.config.mjs

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// @ts-check
2+
/** @type {Partial<import("typedoc").TypeDocOptions> & Partial<import("typedoc-plugin-markdown").PluginOptions> & Partial<import("typedoc-plugin-remark").PluginOptions>} */
3+
const config = {
4+
entryPoints: ['../packages/annotation-comments/src/index.ts'],
5+
tsconfig: '../packages/annotation-comments/tsconfig.json',
6+
plugin: ['typedoc-plugin-markdown', 'typedoc-plugin-remark'],
7+
8+
// What to include in the output
9+
disableSources: true,
10+
excludeExternals: true,
11+
excludeInternal: true,
12+
excludePrivate: true,
13+
excludeProtected: true,
14+
hideGenerator: true,
15+
hidePageHeader: true,
16+
expandObjects: true,
17+
expandParameters: true,
18+
useCodeBlocks: true,
19+
typeDeclarationVisibility: 'compact',
20+
21+
// Add custom preamble
22+
mergeReadme: true,
23+
readme: './typedoc.preamble.md',
24+
25+
// How to sort and group the output
26+
sort: ['required-first', 'alphabetical'],
27+
groupOrder: ['Classes', 'Constructors', 'Functions', 'Methods', 'Accessors', 'Variables', 'Interfaces', 'Type Aliases', '*'],
28+
29+
// Output location
30+
outputFileStrategy: 'modules',
31+
32+
// Markdown-specific settings
33+
outputs: [
34+
{
35+
name: 'markdown',
36+
path: '../packages/annotation-comments',
37+
options: {
38+
cleanOutputDir: false,
39+
},
40+
},
41+
],
42+
remarkStringifyOptions: {
43+
bullet: '-',
44+
handlers: {
45+
text: (node, _, state, info) => state.safe(node.value, info).replace(/\r?\n/g, ' '),
46+
},
47+
},
48+
remarkPlugins: [
49+
[
50+
'remark-link-rewrite',
51+
{
52+
replacer: (url) => url.replace(/^.*?\.md#/g, '#'),
53+
},
54+
],
55+
],
56+
}
57+
58+
export default config

0 commit comments

Comments
 (0)