Skip to content
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

[docs-infra] Add types for withDocsInfra #40301

Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Dec 24, 2023

This catches issues like in mui/mui-toolpad#3026, proof:

It seems that we won't see a next.config.ts support anytime soon: vercel/next.js#5318. But why not lint the file anyway. The alternative would be to have a runtime check of the params like done by Next.js in vercel/next.js#58247 but I don't know, TypeScript feels meant for this purpose.

Assuming that all current & future projects that use docs-infra have to link the config file, it should be OK. We are not playing this card https://github.com/facebook/docusaurus yet.

Now, to be fair, I like how zod also allows us to flag outdated params, ones that do nothing https://github.com/vercel/next.js/blob/0fc1d9e982c9fe2a8da23d95943cd161de4c3178/packages/next/src/server/config.ts#L1004.

@oliviertassinari oliviertassinari added typescript scope: docs-infra Specific to the docs-infra product labels Dec 24, 2023
@mui-bot
Copy link

mui-bot commented Dec 24, 2023

Netlify deploy preview

https://deploy-preview-40301--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 35527d4

@oliviertassinari oliviertassinari merged commit e1d4310 into mui:master Jan 5, 2024
20 of 21 checks passed
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: docs-infra Specific to the docs-infra product typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants