Require newline at the end of each file

This commit is contained in:
Konstantin Wohlwend 2024-10-13 13:06:38 -07:00
parent e762832938
commit 9da481b2cd
72 changed files with 72 additions and 71 deletions

View File

@ -315,4 +315,4 @@ const handler = createSmartRouteHandler({
});
export const GET = handler;
export const POST = handler;
export const POST = handler;

View File

@ -36,4 +36,4 @@ export const POST = createSmartRouteHandler({
body: await response.json()
};
}
});
});

View File

@ -1,3 +1,3 @@
import { connectedAccountAccessTokenCrudHandlers } from "./crud";
export const POST = connectedAccountAccessTokenCrudHandlers.createHandler;
export const POST = connectedAccountAccessTokenCrudHandlers.createHandler;

View File

@ -2,4 +2,4 @@ import { emailTemplateCrudHandlers } from "../crud";
export const GET = emailTemplateCrudHandlers.readHandler;
export const PATCH = emailTemplateCrudHandlers.updateHandler;
export const DELETE = emailTemplateCrudHandlers.deleteHandler;
export const DELETE = emailTemplateCrudHandlers.deleteHandler;

View File

@ -125,4 +125,4 @@ export const emailTemplateCrudHandlers = createLazyProxy(() => createCrudHandler
is_paginated: false,
};
}
}));
}));

View File

@ -1,3 +1,3 @@
import { emailTemplateCrudHandlers } from "./crud";
export const GET = emailTemplateCrudHandlers.listHandler;
export const GET = emailTemplateCrudHandlers.listHandler;

View File

@ -1,4 +1,4 @@
import { apiKeyCrudHandlers } from "../crud";
export const GET = apiKeyCrudHandlers.readHandler;
export const PATCH = apiKeyCrudHandlers.updateHandler;
export const PATCH = apiKeyCrudHandlers.updateHandler;

View File

@ -53,4 +53,4 @@ export const POST = createSmartRouteHandler({
}
} as const;
},
});
});

View File

@ -59,4 +59,4 @@ export const POST = createSmartRouteHandler({
bodyType: "success",
};
},
});
});

View File

@ -1,4 +1,4 @@
import { teamMemberProfilesCrudHandlers } from "../../crud";
export const GET = teamMemberProfilesCrudHandlers.readHandler;
export const PATCH = teamMemberProfilesCrudHandlers.updateHandler;
export const PATCH = teamMemberProfilesCrudHandlers.updateHandler;

View File

@ -1,3 +1,3 @@
import { teamMemberProfilesCrudHandlers } from "./crud";
export const GET = teamMemberProfilesCrudHandlers.listHandler;
export const GET = teamMemberProfilesCrudHandlers.listHandler;

View File

@ -1,4 +1,4 @@
import { teamMembershipsCrudHandlers } from "../../crud";
export const POST = teamMembershipsCrudHandlers.createHandler;
export const DELETE = teamMembershipsCrudHandlers.deleteHandler;
export const DELETE = teamMembershipsCrudHandlers.deleteHandler;

View File

@ -1,4 +1,4 @@
import { teamPermissionDefinitionsCrudHandlers } from "../crud";
export const PATCH = teamPermissionDefinitionsCrudHandlers.updateHandler;
export const DELETE = teamPermissionDefinitionsCrudHandlers.deleteHandler;
export const DELETE = teamPermissionDefinitionsCrudHandlers.deleteHandler;

View File

@ -1,4 +1,4 @@
import { teamPermissionDefinitionsCrudHandlers } from "./crud";
export const POST = teamPermissionDefinitionsCrudHandlers.createHandler;
export const GET = teamPermissionDefinitionsCrudHandlers.listHandler;
export const GET = teamPermissionDefinitionsCrudHandlers.listHandler;

View File

@ -1,4 +1,4 @@
import { teamPermissionsCrudHandlers } from "../../../crud";
export const POST = teamPermissionsCrudHandlers.createHandler;
export const DELETE = teamPermissionsCrudHandlers.deleteHandler;
export const DELETE = teamPermissionsCrudHandlers.deleteHandler;

View File

@ -1,3 +1,3 @@
import { teamPermissionsCrudHandlers } from "./crud";
export const GET = teamPermissionsCrudHandlers.listHandler;
export const GET = teamPermissionsCrudHandlers.listHandler;

View File

@ -2,4 +2,4 @@ import { teamsCrudHandlers } from "../crud";
export const GET = teamsCrudHandlers.readHandler;
export const PATCH = teamsCrudHandlers.updateHandler;
export const DELETE = teamsCrudHandlers.deleteHandler;
export const DELETE = teamsCrudHandlers.deleteHandler;

View File

@ -1,4 +1,4 @@
import { teamsCrudHandlers } from "./crud";
export const GET = teamsCrudHandlers.listHandler;
export const POST = teamsCrudHandlers.createHandler;
export const POST = teamsCrudHandlers.createHandler;

View File

@ -18,4 +18,4 @@ const appPortalCrudHandlers = createLazyProxy(() => createCrudHandlers(svixToken
},
}));
export const POST = appPortalCrudHandlers.createHandler;
export const POST = appPortalCrudHandlers.createHandler;

View File

@ -1,3 +1,3 @@
import { PrismaClient } from "@prisma/client";
export type PrismaTransaction = Parameters<Parameters<PrismaClient['$transaction']>[0]>[0];
export type PrismaTransaction = Parameters<Parameters<PrismaClient['$transaction']>[0]>[0];

View File

@ -40,4 +40,4 @@ export class LinkedInProvider extends OAuthBaseProvider {
emailVerified: userInfo.email_verified,
});
}
}
}

View File

@ -44,4 +44,4 @@ export class MicrosoftProvider extends OAuthBaseProvider {
emailVerified: false,
});
}
}
}

View File

@ -40,4 +40,4 @@ export class XProvider extends OAuthBaseProvider {
emailVerified: false,
}, { expectNoEmail: true });
}
}
}

View File

@ -19,4 +19,4 @@ export function validateUserInfo(
throw new Error("Email is required");
}
return OAuthUserInfoSchema.validateSync(userInfo);
}
}

View File

@ -7,4 +7,4 @@ export default function Page ({ children } : { children?: React.ReactNode }) {
{children}
</div>
);
}
}

View File

@ -6,4 +6,4 @@ export const metadata = {
export default function Page () {
return <PageClient />;
}
}

View File

@ -28,4 +28,4 @@ export function PageLayout(props: {
</div>
</div>
);
}
}

View File

@ -2,4 +2,4 @@ import { redirect } from "next/navigation";
export default function Page({ params }: { params: { projectId: string } }) {
redirect(`/projects/${params.projectId}/users`);
}
}

View File

@ -8,4 +8,4 @@ export default function Page({ params }: { params: { teamId: string } }) {
return (
<PageClient teamId={params.teamId} />
);
}
}

View File

@ -31,4 +31,4 @@ export function getSvixResult<D>(data: {
loaded: true,
data: data.data,
};
}
}

View File

@ -9,4 +9,4 @@ export default function Page ({ children } : { children?: React.ReactNode }) {
</div>
</div>
);
}
}

View File

@ -2,4 +2,4 @@ import { redirect } from "next/navigation";
export default function Page() {
redirect("projects");
}
}

View File

@ -15,4 +15,4 @@ export default function Actions() {
</Button>
</div>
);
}
}

View File

@ -56,4 +56,4 @@ export function FeedbackDialog(props: {
});
}}
/>;
}
}

View File

@ -43,4 +43,4 @@ export function StyledLink(props: LinkProps) {
{props.children}
</Link>
);
}
}

View File

@ -13,4 +13,4 @@ export const SearchBar = React.forwardRef<
</div>
));
SearchBar.displayName = "SearchBar";
SearchBar.displayName = "SearchBar";

View File

@ -6,4 +6,4 @@ export function ThemeProvider(props: { children: React.ReactNode }) {
return <NextThemeProvider attribute="class">
{props.children}
</NextThemeProvider>;
}
}

View File

@ -394,4 +394,4 @@ it("is not allowed to create a team and add a different user as the creator on t
"headers": Headers { <some fields may have been hidden> },
}
`);
});
});

View File

@ -650,4 +650,4 @@ it("enables create team on sign up", async ({ expect }) => {
"headers": Headers { <some fields may have been hidden> },
}
`);
});
});

View File

@ -10,6 +10,7 @@ module.exports = {
rules: {
"no-unused-expressions": ["error", { enforceForJSX: true }],
"no-trailing-spaces": "warn",
"eol-last": "error",
"key-spacing": "error",
indent: [
"error",

View File

@ -6,4 +6,4 @@ export default function NotFound() {
<p>The page you are looking for does not exist.</p>
</MessageCard>
);
}
}

View File

@ -3,4 +3,4 @@ import { stackServerApp } from "src/stack";
export default async function ProtectedPage() {
await stackServerApp.getUser({ or: 'redirect' });
return <div>This is protected. You can see this because you are signed in</div>;
}
}

View File

@ -21,4 +21,4 @@ export default function Header() {
<div className="min-h-12"/> {/* Placeholder for fixed header */}
</>
);
}
}

View File

@ -19,4 +19,4 @@ export default function Page() {
}, [tokens]);
return <div>{response ? JSON.stringify(response) : 'Loading...'}</div>;
}
}

View File

@ -21,4 +21,4 @@ export default function TeamPage({ params }: { params: { teamId: string } }) {
<p>You are a member of this team.</p>
</div>
);
}
}

View File

@ -24,4 +24,4 @@ export default function TeamsPage() {
))}
</div>
);
}
}

View File

@ -7,4 +7,4 @@ export default function Provider({ children }) {
{children}
</StackTheme>
);
}
}

View File

@ -150,4 +150,4 @@ export function Text({ style, props }: TextProps) {
const parsedText = parseText(text);
return <p style={wStyle}>{parsedText}</p>;
}
}

View File

@ -128,4 +128,4 @@ export const emailVerificationTemplate: TEditorConfiguration = {
}
}
}
};
};

View File

@ -48,4 +48,4 @@ export function getProductionModeErrors(project: ProjectsCrud["Admin"]["Read"]):
}
return errors;
}
}

View File

@ -47,4 +47,4 @@ export const emailTemplateCrud = createCrud({
}
}
});
export type EmailTemplateCrud = CrudTypeOf<typeof emailTemplateCrud>;
export type EmailTemplateCrud = CrudTypeOf<typeof emailTemplateCrud>;

View File

@ -18,4 +18,4 @@ export const connectedAccountAccessTokenCrud = createCrud({
}
},
});
export type ConnectedAccountAccessTokenCrud = CrudTypeOf<typeof connectedAccountAccessTokenCrud>;
export type ConnectedAccountAccessTokenCrud = CrudTypeOf<typeof connectedAccountAccessTokenCrud>;

View File

@ -16,4 +16,4 @@ export const svixTokenCrud = createCrud({
},
}
});
export type SvixTokenCrud = CrudTypeOf<typeof svixTokenCrud>;
export type SvixTokenCrud = CrudTypeOf<typeof svixTokenCrud>;

View File

@ -19,4 +19,4 @@ export const teamInvitationDetailsCrud = createCrud({
},
});
export type TeamInvitationDetailsCrud = CrudTypeOf<typeof teamInvitationDetailsCrud>;
export type TeamInvitationDetailsCrud = CrudTypeOf<typeof teamInvitationDetailsCrud>;

View File

@ -58,4 +58,4 @@ export const teamMemberProfilesCrud = createCrud({
},
});
export type TeamMemberProfilesCrud = CrudTypeOf<typeof teamMemberProfilesCrud>;
export type TeamMemberProfilesCrud = CrudTypeOf<typeof teamMemberProfilesCrud>;

View File

@ -53,4 +53,4 @@ export const teamMembershipDeletedWebhookEvent = {
description: "This event is triggered when a user is removed from a team.",
tags: ["Teams"],
},
} satisfies WebhookEvent<typeof teamMembershipsCrud.server.readSchema>;
} satisfies WebhookEvent<typeof teamMembershipsCrud.server.readSchema>;

View File

@ -22,4 +22,4 @@ export const webhookEvents = [
teamDeletedWebhookEvent,
teamMembershipCreatedWebhookEvent,
teamMembershipDeletedWebhookEvent,
] as const;
] as const;

View File

@ -6,4 +6,4 @@ export * from "./pagination";
export * from "./toolbar-items";
export * from "./toolbar";
export * from "./utils";
export * from "./view-options";
export * from "./view-options";

View File

@ -4,4 +4,4 @@ export function standardFilterFn (row: any, id: string, value: any) {
export function arrayFilterFn (row: any, id: string, value: any) {
return value.some((v: any) => row.getValue(id).includes(v));
}
}

View File

@ -36,4 +36,4 @@ const InlineCode = React.forwardRef<
});
InlineCode.displayName = "Code";
export { InlineCode };
export { InlineCode };

View File

@ -48,4 +48,4 @@ export const DelayedInput = React.forwardRef<HTMLInputElement, DelayedInputProps
return <Input ref={ref} {...props} value={value} onChange={onChange} />;
}
);
DelayedInput.displayName = "DelayedInput";
DelayedInput.displayName = "DelayedInput";

View File

@ -46,4 +46,4 @@ const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
);
PasswordInput.displayName = "PasswordInput";
export { PasswordInput };
export { PasswordInput };

View File

@ -28,4 +28,4 @@ const Separator = React.forwardRef<
);
Separator.displayName = SeparatorPrimitive.Root.displayName;
export { Separator };
export { Separator };

View File

@ -44,4 +44,4 @@ const Typography = React.forwardRef<HTMLHeadingElement, TypographyProps>(
);
Typography.displayName = "Typography";
export { Typography };
export { Typography };

View File

@ -3,4 +3,4 @@ import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
}

View File

@ -858,4 +858,4 @@ export function EditableText(props: { value: string, onSave?: (value: string) =>
)}
</div>
);
}
}

View File

@ -42,4 +42,4 @@ export function OAuthCallback(props: { fullPage?: boolean }) {
<p>{t("This is most likely an error in Stack. Please report it.")}</p>
</div> : null}
</MessageCard>;
}
}

View File

@ -127,4 +127,4 @@ function MobileLayout(props: { items: SidebarItem[], title?: ReactNode, selected
</div>
);
}
}
}

View File

@ -25,4 +25,4 @@ export function UserAvatar(props: {
</AvatarFallback>
</Avatar>
);
}
}

View File

@ -122,4 +122,4 @@ export function ProfileImageEditor(props: {
</div>
</div>
);
}
}

View File

@ -15,4 +15,4 @@ export function TeamIcon(props: { team: Team }) {
</div>
);
}
}
}

View File

@ -51,4 +51,4 @@ export const DEFAULT_THEME = {
ring: 'hsl(240 4.9% 83.9%)',
},
radius: '0.5rem',
} as const;
} as const;