From b559919a3a4dab85d180f7d62bbfabc3aec68996 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Fri, 23 Aug 2024 13:54:00 -0400 Subject: [PATCH] Update with latest linting rules --- packages/core/src/storage/extract.ts | 3 ++- packages/core/src/utils/annotations.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/src/storage/extract.ts b/packages/core/src/storage/extract.ts index 6bb35b82b..30294e27d 100644 --- a/packages/core/src/storage/extract.ts +++ b/packages/core/src/storage/extract.ts @@ -203,7 +203,8 @@ export function loadLayoutType(typeName: TypeName | null | undefined, layout: St function getRetypedRenamed(varDecl: VariableDeclaration) { let retypedFrom, renamedFrom; if ('documentation' in varDecl) { - const docs = typeof varDecl.documentation === 'string' ? varDecl.documentation : varDecl.documentation?.text ?? ''; + const docs = + typeof varDecl.documentation === 'string' ? varDecl.documentation : (varDecl.documentation?.text ?? ''); for (const { groups } of execall( /^\s*(?:@(?\w+)(?::(?<tag>[a-z][a-z-]*))? )?(?<args>(?:(?!^\s@\w+)[^])*)/m, docs, diff --git a/packages/core/src/utils/annotations.ts b/packages/core/src/utils/annotations.ts index 3a5e9d2cf..cbaac7c03 100644 --- a/packages/core/src/utils/annotations.ts +++ b/packages/core/src/utils/annotations.ts @@ -48,7 +48,7 @@ export function getAnnotationArgs(doc: string, tag: string, supportedArgs?: read */ export function getDocumentation(node: Node) { if ('documentation' in node) { - return typeof node.documentation === 'string' ? node.documentation : node.documentation?.text ?? ''; + return typeof node.documentation === 'string' ? node.documentation : (node.documentation?.text ?? ''); } else { return ''; }