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): auto-inject ban-types default options#7714
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): auto-inject ban-types default options#7714
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks for the PR,@Josh-Cena! 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 commentedOct 1, 2023 • 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. |
03994ba tod6054faComparenx-cloudbot commentedOct 1, 2023 • 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.
| } | ||
| // Insert default rule options for ban-types | ||
| if(file.stem==='ban-types'){ |
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.
😬 I do dislike having such rule-specific things in this already kind of big file... what do you think about having an mdx component like<BanTypesDefaultOptions />?
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.
We already have file-specific handling for this page. This cannot be an MDX component because it has to work server-side and get statically injected instead of dynamically rendered.
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.
Blurgh, I keep forgetting these things. MDX components don't work server-side? Is this mentioned in docs / one of the things blocked by MDX v2? (I searched and can't find it)
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.
MDX components are basically React components. They can get server-rendered (through the same machinery that renders the rest of the page to HTML) but they can't access server data like files.
JoshuaKGoldberg left a comment
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.
Seems reasonable - I'll defer to you on Docusaurus things 😄

PR Checklist
Overview
Ideally I should use an actual parser to get the
defaultTypes, but there's no parser package readily installed in the website, so I thought this should do too.