Skip to content

Commit 8f30476

Browse files
committed
fix(jsdocs): sort uncategorized utils to the end
1 parent 97e9b47 commit 8f30476

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/generators/jsdocs.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,15 @@ function renderSchema(schema: Schema, opts: { headingLevel: number }) {
6868
}
6969

7070
const lines: string[] = [];
71-
for (const group of Object.keys(sections).sort()) {
71+
for (const group of Object.keys(sections).sort((a, b) => {
72+
if (a === "") {
73+
return 1;
74+
}
75+
if (b === "") {
76+
return -1;
77+
}
78+
return a.localeCompare(b);
79+
})) {
7280
if (group) {
7381
lines.push(`${"#".repeat(opts.headingLevel)} ${group}`, "");
7482
}

0 commit comments

Comments
 (0)