Skip to content

Commit

Permalink
lint:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Sep 12, 2024
1 parent 7389f4a commit cac5e0d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/fdr-sdk/src/navigation/utils/findNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export function findNode(root: FernNavigation.RootNode, slug: FernNavigation.Slu
return { type: "redirect", redirect: root.pointsTo };
}

const redirect = hasRedirect(found.node) ? found.node.pointsTo : currentVersion?.pointsTo ?? root.pointsTo;
const redirect = hasRedirect(found.node) ? found.node.pointsTo : (currentVersion?.pointsTo ?? root.pointsTo);

if (redirect == null || redirect === slug) {
return { type: "notFound", redirect: undefined };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const ErrorExampleSelect: FC<PropsWithChildren<ErrorExampleSelect.Props>>
const content = `${
selectedError.examples.length > 1
? `${selectedError.name ?? getMessageForStatus(selectedError.statusCode)} Example ${selectedExampleIndex + 1}`
: selectedError.name ?? getMessageForStatus(selectedError.statusCode)
: (selectedError.name ?? getMessageForStatus(selectedError.statusCode))
}`;
return (
<span className={clsx("inline-flex gap-2 items-center")}>
Expand Down Expand Up @@ -103,7 +103,7 @@ export const ErrorExampleSelect: FC<PropsWithChildren<ErrorExampleSelect.Props>>
{example.name ??
(error.examples.length > 1
? `${error.name ?? getMessageForStatus(error.statusCode)} Example ${j + 1}`
: error.name ?? getMessageForStatus(error.statusCode))}
: (error.name ?? getMessageForStatus(error.statusCode)))}
</span>
</span>
</FernSelectItem>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/app/src/changelog/ChangelogEntryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { DocsContent } from "../resolver/DocsContent";
export function ChangelogEntryPage({ content }: { content: DocsContent.ChangelogEntryPage }): ReactElement {
const page = content.page;
const title = typeof page !== "string" ? page?.frontmatter.title : undefined;
const excerpt = typeof page !== "string" ? page?.frontmatter.subtitle ?? page?.frontmatter.excerpt : undefined;
const excerpt = typeof page !== "string" ? (page?.frontmatter.subtitle ?? page?.frontmatter.excerpt) : undefined;
return (
<div className="flex justify-between px-4 md:px-6 lg:pl-8 lg:pr-16 xl:pr-0">
<div className="w-full min-w-0 pt-8">
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/app/src/mdx/plugins/rehypeLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function rehypeFernLayout(opt: Options): (tree: Root, vfile: VFile) => vo

const children = tree.children as ElementContent[];
const subtitle = matter.subtitle != null ? wrapChildren(parseMarkdown(matter.subtitle)) : undefined;
const tableOfContents = matter["hide-toc"] ?? false ? undefined : makeToc(tree, matter["force-toc"] ?? false);
const tableOfContents = (matter["hide-toc"] ?? false) ? undefined : makeToc(tree, matter["force-toc"] ?? false);
const aside = wrapChildren(asideContents);
switch (matter.layout) {
case "custom":
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/app/src/playground/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function buildAuthHeaders(
const token =
authState.oauth?.selectedInputMethod === "credentials"
? authState.oauth?.accessToken
: authState.oauth?.userSuppliedAccessToken ?? "";
: (authState.oauth?.userSuppliedAccessToken ?? "");

if (oAuthClientCredentialReferencedEndpointLoginFlowProps && token) {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default async function GET(req: NextRequest): Promise<NextResponse> {
name:
user.firstName != null && user.lastName != null
? `${user.firstName} ${user.lastName}`
: user.firstName ?? user.email.split("@")[0],
: (user.firstName ?? user.email.split("@")[0]),
email: user.email,
};

Expand Down
2 changes: 1 addition & 1 deletion servers/fdr/src/controllers/snippets/getSnippetsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function getSnippetsService(app: FdrApplication): SnippetsService {
endpointSnippetTemplate,
});

snippets.push(await templateResolver.resolve());
snippets.push(templateResolver.resolve());
}

return res.send(snippets);
Expand Down

0 comments on commit cac5e0d

Please sign in to comment.