-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(templates): make TypeScript strict in website template #10587
base: main
Are you sure you want to change the base?
Conversation
@@ -125,7 +125,7 @@ export const Pages: CollectionConfig<'pages'> = { | |||
hooks: { | |||
afterChange: [revalidatePage], | |||
beforeChange: [populatePublishedAt], | |||
beforeDelete: [revalidateDelete], | |||
afterDelete: [revalidateDelete], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulpopus is this correct? beforeDelete
doesn't have access to doc
so ts complains. I don't know if it was working properly before this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think this fine if you've tested it works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nitpick left, otherwise looks good! Thank you for your work on this.
After this merged you can trigger a template sync via actions -> "post-release-templates". It copies over files while bumping versions and whatever else
@@ -125,7 +125,7 @@ export const Pages: CollectionConfig<'pages'> = { | |||
hooks: { | |||
afterChange: [revalidatePage], | |||
beforeChange: [populatePublishedAt], | |||
beforeDelete: [revalidateDelete], | |||
afterDelete: [revalidateDelete], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think this fine if you've tested it works
export async function generateMetadata({ params: paramsPromise }): Promise<Metadata> { | ||
const { slug = 'home' } = await paramsPromise | ||
export async function generateMetadata({ params }: Args): Promise<Metadata> { | ||
const { slug = 'home' } = await params |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpick here, but we should consistently rename params
to paramsPromise
. Since it's a paradigm shift, it's better they understand this is a promise you need to await, for those learning nextjs.
updating pnpm-lock was necessary due to #10398