Skip to content

Commit

Permalink
Update with latest linting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ericglau committed Aug 23, 2024
1 parent e54cfa3 commit b559919
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/core/src/storage/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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*(?:@(?<title>\w+)(?::(?<tag>[a-z][a-z-]*))? )?(?<args>(?:(?!^\s@\w+)[^])*)/m,
docs,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/utils/annotations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
}
Expand Down

0 comments on commit b559919

Please sign in to comment.