Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
chore(website): allow markdown in titles#9839
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
chore(website): allow markdown in titles#9839
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks for the PR,@JoshuaKGoldberg! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint. |
netlifybot commentedAug 20, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview fortypescript-eslint ready!
To edit notification comments on pull requests, go to yourNetlify site configuration. |
nx-cloudbot commentedAug 20, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
Neat—makes sense to me :)
codecovbot commentedAug 20, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## main #9839 +/- ##======================================= Coverage 88.04% 88.04% ======================================= Files 407 407 Lines 13948 13948 Branches 4078 4078 ======================================= Hits 12280 12280 Misses 1355 1355 Partials 313 313
Flags with carried forward coverage won't be shown.Click here to find out more. |
A few lint errors—then we can merge it. |
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
// @ts-expect-error -- BlogSidebarItem only allows title: string, but we render as Markdown | ||
title: <Markdown>{item.title}</Markdown>, |
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.
This still gives a type checking error. I suspect you need to place the@ts-expect-error
elsewhere.
But really, I would suggest you do the cast here—Docusaurus is not going to change the type ofBlogSidebarItem
so you don't actually gain any soundness.
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.
Docusaurus is not going to change the type of
BlogSidebarItem
Funny, I was thinking of filing an issue suggesting it allow any React node type for the title...
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.
The type of Docusaurus describes what we will pass to these components by default, not what they can accept by principle; narrower types may allow swizzlers to do other things they otherwise can't do, say,title.toUpperCase()
. Not easy to provide types in a customizable system :)
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 need the branch to be up to date
93f285d
intotypescript-eslint:mainUh oh!
There was an error while loading.Please reload this page.
PR Checklist
Overview
Swizzles the native Docusaurus components so that we can use
react-markdown
for titles.💖