From bd51128b01111b3d8c9f6af7aecef724a03e0376 Mon Sep 17 00:00:00 2001 From: Maxi Date: Wed, 20 Mar 2024 20:27:05 +0100 Subject: [PATCH] chore: add warning for missing function description in jsdocs --- src/generators/jsdocs.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/generators/jsdocs.ts b/src/generators/jsdocs.ts index 850a70a..fe5c9d7 100644 --- a/src/generators/jsdocs.ts +++ b/src/generators/jsdocs.ts @@ -1,5 +1,6 @@ import type { Schema } from "untyped"; import { titleCase } from "scule"; +import consola from "consola"; import { defineGenerator } from "../generator"; import { resolvePath } from "../_utils"; @@ -104,6 +105,10 @@ function _renderSection( if (schema.type === "function") { // Function signature in heading heading = `\`${_generateFunctionSig(key, schema)}\``; + + if (!schema.description) { + consola.warn(`No description found in function ${heading}`); + } } else if (schema.type !== "object") { // JS value lines.push(