Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
danez authored and renovate[bot] committed Nov 25, 2023
1 parent 15611f9 commit 9da651a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions packages/react-docgen/src/utils/parseJsDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ function getType(tagType: Type | null | undefined): JsDocType | null {
'name' in tagType && tagType.name
? tagType.name
: 'expression' in tagType &&
tagType.expression &&
'name' in tagType.expression
? tagType.expression.name
: null;
tagType.expression &&
'name' in tagType.expression
? tagType.expression.name
: null;

if (typeName) {
return { name: typeName };
Expand Down
4 changes: 2 additions & 2 deletions packages/react-docgen/src/utils/resolveObjectKeysToArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export function resolveObjectToNameArray(
const name: string = key.isIdentifier()
? key.node.name
: raw
? (key.node.extra?.raw as string)
: `${key.node.value}`;
? (key.node.extra?.raw as string)
: `${key.node.value}`;

values.push(name);
} else if (
Expand Down
6 changes: 3 additions & 3 deletions packages/react-docgen/src/utils/resolveObjectValuesToArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ function resolveObjectToPropMap(object: NodePath): Map<string, string> | null {
const value = valuePath.isStringLiteral()
? `"${valuePath.node.value}"`
: valuePath.isNumericLiteral()
? `${valuePath.node.value}`
: // we return null here because there are a lot of cases and we don't know yet what we need to handle
'null';
? `${valuePath.node.value}`
: // we return null here because there are a lot of cases and we don't know yet what we need to handle
'null';

values.set(name, value);
} else if (propPath.isSpreadElement()) {
Expand Down

0 comments on commit 9da651a

Please sign in to comment.