diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..f80dc7f80 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,7 @@ +# Config files +*.config.js +*.config.cjs + +# Statically hosted javascript files +apps/*/public/*.js +apps/*/public/*.cjs diff --git a/apps/marketing/src/app/(marketing)/[content]/page.tsx b/apps/marketing/src/app/(marketing)/[content]/page.tsx index f32765024..37d6d1b63 100644 --- a/apps/marketing/src/app/(marketing)/[content]/page.tsx +++ b/apps/marketing/src/app/(marketing)/[content]/page.tsx @@ -5,7 +5,7 @@ import { allDocuments } from 'contentlayer/generated'; import type { MDXComponents } from 'mdx/types'; import { useMDXComponent } from 'next-contentlayer/hooks'; -export const generateStaticParams = async () => +export const generateStaticParams = () => allDocuments.map((post) => ({ post: post._raw.flattenedPath })); export const generateMetadata = ({ params }: { params: { content: string } }) => { diff --git a/apps/marketing/src/app/(marketing)/blog/[post]/page.tsx b/apps/marketing/src/app/(marketing)/blog/[post]/page.tsx index 68f22e734..5192dec32 100644 --- a/apps/marketing/src/app/(marketing)/blog/[post]/page.tsx +++ b/apps/marketing/src/app/(marketing)/blog/[post]/page.tsx @@ -7,7 +7,7 @@ import { ChevronLeft } from 'lucide-react'; import type { MDXComponents } from 'mdx/types'; import { useMDXComponent } from 'next-contentlayer/hooks'; -export const generateStaticParams = async () => +export const generateStaticParams = () => allBlogPosts.map((post) => ({ post: post._raw.flattenedPath })); export const generateMetadata = ({ params }: { params: { post: string } }) => { diff --git a/apps/marketing/src/app/(marketing)/open/page.tsx b/apps/marketing/src/app/(marketing)/open/page.tsx index 539e624c6..2d5bc2aa4 100644 --- a/apps/marketing/src/app/(marketing)/open/page.tsx +++ b/apps/marketing/src/app/(marketing)/open/page.tsx @@ -43,7 +43,7 @@ export default async function OpenPage() { accept: 'application/vnd.github.v3+json', }, }) - .then((res) => res.json()) + .then(async (res) => res.json()) .then((res) => ZGithubStatsResponse.parse(res)); const { total_count: mergedPullRequests } = await fetch( @@ -54,7 +54,7 @@ export default async function OpenPage() { }, }, ) - .then((res) => res.json()) + .then(async (res) => res.json()) .then((res) => ZMergedPullRequestsResponse.parse(res)); const STARGAZERS_DATA = await fetch('https://stargrazer-live.onrender.com/api/stats', { @@ -62,7 +62,7 @@ export default async function OpenPage() { accept: 'application/json', }, }) - .then((res) => res.json()) + .then(async (res) => res.json()) .then((res) => ZStargazersLiveResponse.parse(res)); return ( diff --git a/apps/marketing/src/app/(marketing)/page.tsx b/apps/marketing/src/app/(marketing)/page.tsx index 09e9e3dec..377384701 100644 --- a/apps/marketing/src/app/(marketing)/page.tsx +++ b/apps/marketing/src/app/(marketing)/page.tsx @@ -24,7 +24,7 @@ export default async function IndexPage() { accept: 'application/vnd.github.v3+json', }, }) - .then((res) => res.json()) + .then(async (res) => res.json()) .then((res) => (typeof res.stargazers_count === 'number' ? res.stargazers_count : undefined)) .catch(() => undefined); diff --git a/apps/marketing/src/components/(marketing)/claim-plan-dialog.tsx b/apps/marketing/src/components/(marketing)/claim-plan-dialog.tsx index f350a7e01..7de30bba3 100644 --- a/apps/marketing/src/components/(marketing)/claim-plan-dialog.tsx +++ b/apps/marketing/src/components/(marketing)/claim-plan-dialog.tsx @@ -63,7 +63,9 @@ export const ClaimPlanDialog = ({ className, planId, children }: ClaimPlanDialog const onFormSubmit = async ({ name, email }: TClaimPlanDialogFormSchema) => { try { - const delay = new Promise((resolve) => setTimeout(resolve, 1000)); + const delay = new Promise((resolve) => { + setTimeout(resolve, 1000); + }); const [redirectUrl] = await Promise.all([ claimPlan({ name, email, planId, signatureText: name, signatureDataUrl: null }), diff --git a/apps/marketing/src/components/(marketing)/password-reveal.tsx b/apps/marketing/src/components/(marketing)/password-reveal.tsx index 7e1cb72a3..b31765943 100644 --- a/apps/marketing/src/components/(marketing)/password-reveal.tsx +++ b/apps/marketing/src/components/(marketing)/password-reveal.tsx @@ -13,7 +13,7 @@ export const PasswordReveal = ({ password }: PasswordRevealProps) => { const [, copy] = useCopyToClipboard(); const onCopyClick = () => { - copy(password).then(() => { + void copy(password).then(() => { toast({ title: 'Copied to clipboard', description: 'Your password has been copied to your clipboard.', diff --git a/apps/marketing/src/components/(marketing)/widget.tsx b/apps/marketing/src/components/(marketing)/widget.tsx index 1a15069e9..15e15d04c 100644 --- a/apps/marketing/src/components/(marketing)/widget.tsx +++ b/apps/marketing/src/components/(marketing)/widget.tsx @@ -124,7 +124,7 @@ export const Widget = ({ className, children, ...props }: WidgetProps) => { setValue('signatureDataUrl', draftSignatureDataUrl); setValue('signatureText', ''); - trigger('signatureDataUrl'); + void trigger('signatureDataUrl'); setShowSigningDialog(false); }; @@ -135,7 +135,9 @@ export const Widget = ({ className, children, ...props }: WidgetProps) => { signatureText, }: TWidgetFormSchema) => { try { - const delay = new Promise((resolve) => setTimeout(resolve, 1000)); + const delay = new Promise((resolve) => { + setTimeout(resolve, 1000); + }); // eslint-disable-next-line turbo/no-undeclared-env-vars const planId = process.env.NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID; diff --git a/apps/web/src/app/(signing)/sign/[token]/name-field.tsx b/apps/web/src/app/(signing)/sign/[token]/name-field.tsx index f200d94cd..9688619fa 100644 --- a/apps/web/src/app/(signing)/sign/[token]/name-field.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/name-field.tsx @@ -149,7 +149,7 @@ export const NameField = ({ field, recipient }: NameFieldProps) => { disabled={!localFullName} onClick={() => { setShowFullNameModal(false); - onSign('local'); + void onSign('local'); }} > Sign diff --git a/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx b/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx index bbc58b5e8..03fc40914 100644 --- a/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx @@ -182,7 +182,7 @@ export const SignatureField = ({ field, recipient }: SignatureFieldProps) => { disabled={!localSignature} onClick={() => { setShowSignatureModal(false); - onSign('local'); + void onSign('local'); }} > Sign diff --git a/apps/web/src/components/(dashboard)/layout/profile-dropdown.tsx b/apps/web/src/components/(dashboard)/layout/profile-dropdown.tsx index f7d14c39d..02af86d70 100644 --- a/apps/web/src/components/(dashboard)/layout/profile-dropdown.tsx +++ b/apps/web/src/components/(dashboard)/layout/profile-dropdown.tsx @@ -118,7 +118,7 @@ export const ProfileDropdown = ({ user }: ProfileDropdownProps) => { - signOut({ + void signOut({ callbackUrl: '/', }) } diff --git a/apps/web/src/components/(marketing)/claim-plan-dialog.tsx b/apps/web/src/components/(marketing)/claim-plan-dialog.tsx index 06bfd5ced..1f78c5292 100644 --- a/apps/web/src/components/(marketing)/claim-plan-dialog.tsx +++ b/apps/web/src/components/(marketing)/claim-plan-dialog.tsx @@ -63,7 +63,9 @@ export const ClaimPlanDialog = ({ className, planId, children }: ClaimPlanDialog const onFormSubmit = async ({ name, email }: TClaimPlanDialogFormSchema) => { try { - const delay = new Promise((resolve) => setTimeout(resolve, 1000)); + const delay = new Promise((resolve) => { + setTimeout(resolve, 1000); + }); const [redirectUrl] = await Promise.all([ claimPlan({ name, email, planId, signatureText: name, signatureDataUrl: null }), diff --git a/apps/web/src/components/(marketing)/password-reveal.tsx b/apps/web/src/components/(marketing)/password-reveal.tsx index 7e1cb72a3..b31765943 100644 --- a/apps/web/src/components/(marketing)/password-reveal.tsx +++ b/apps/web/src/components/(marketing)/password-reveal.tsx @@ -13,7 +13,7 @@ export const PasswordReveal = ({ password }: PasswordRevealProps) => { const [, copy] = useCopyToClipboard(); const onCopyClick = () => { - copy(password).then(() => { + void copy(password).then(() => { toast({ title: 'Copied to clipboard', description: 'Your password has been copied to your clipboard.', diff --git a/apps/web/src/components/(marketing)/widget.tsx b/apps/web/src/components/(marketing)/widget.tsx index 1a15069e9..15e15d04c 100644 --- a/apps/web/src/components/(marketing)/widget.tsx +++ b/apps/web/src/components/(marketing)/widget.tsx @@ -124,7 +124,7 @@ export const Widget = ({ className, children, ...props }: WidgetProps) => { setValue('signatureDataUrl', draftSignatureDataUrl); setValue('signatureText', ''); - trigger('signatureDataUrl'); + void trigger('signatureDataUrl'); setShowSigningDialog(false); }; @@ -135,7 +135,9 @@ export const Widget = ({ className, children, ...props }: WidgetProps) => { signatureText, }: TWidgetFormSchema) => { try { - const delay = new Promise((resolve) => setTimeout(resolve, 1000)); + const delay = new Promise((resolve) => { + setTimeout(resolve, 1000); + }); // eslint-disable-next-line turbo/no-undeclared-env-vars const planId = process.env.NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID; diff --git a/apps/web/src/components/forms/signin.tsx b/apps/web/src/components/forms/signin.tsx index 9e9a01976..2ffb2798e 100644 --- a/apps/web/src/components/forms/signin.tsx +++ b/apps/web/src/components/forms/signin.tsx @@ -76,10 +76,7 @@ export const SignInForm = ({ className }: SignInFormProps) => { return (
{ - e.preventDefault(); - handleSubmit(onFormSubmit)(); - }} + onSubmit={handleSubmit(onFormSubmit)} >