From 39a7ff85b388bf81e538f6635f3608d694b88a0d Mon Sep 17 00:00:00 2001 From: driesva Date: Wed, 25 Feb 2026 13:24:08 +0100 Subject: [PATCH] If there's no reference or reference has no url, do not include `doc-url` Fix typo in comments of types.d.ts fixes #179 --- packages/jet-brains-integration/src/types.d.ts | 2 +- packages/jet-brains-integration/src/web-types-generator.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/jet-brains-integration/src/types.d.ts b/packages/jet-brains-integration/src/types.d.ts index 8e63813..cbdbf8d 100644 --- a/packages/jet-brains-integration/src/types.d.ts +++ b/packages/jet-brains-integration/src/types.d.ts @@ -16,7 +16,7 @@ export interface Options extends BaseOptions { prefix?: string; /** Adds a suffix to tag references */ suffix?: string; - /** Automatically adds reference to yor package.json */ + /** Automatically adds reference to your package.json */ packageJson?: boolean; /** Used to create a link within the component info bubble */ referenceTemplate?: (name: string, tag?: string) => Reference; diff --git a/packages/jet-brains-integration/src/web-types-generator.ts b/packages/jet-brains-integration/src/web-types-generator.ts index 215c589..337b930 100644 --- a/packages/jet-brains-integration/src/web-types-generator.ts +++ b/packages/jet-brains-integration/src/web-types-generator.ts @@ -47,7 +47,7 @@ export function getTagList( component.tagName || toKebabCase(component.name) }${options.suffix}`, description: getComponentDetailsTemplate(component, options), - ["doc-url"]: reference?.url || "", + ...(reference?.url && { "doc-url": reference.url }), attributes: getComponentAttributes(component, options.typesSrc), slots: component.slots?.map((slot) => { return {