How to disable/override limited-exports-page-templates
in ESLint?
#37441
Replies: 2 comments 9 replies
-
Hi!
Can you elaborate on this? The MDX v2 update is quite big, the maintainers of MDX changed quite a bit of stuff but so far a lot of people managed the upgrade.
Yes, that's correct. They have to be there to ensure that Fast Refresh is working correctly. A user opened #35756 to explain that Fast Refresh with the transformer isn't working. I explained there why that happens.
I see two paths forward:
|
Beta Was this translation helpful? Give feedback.
-
Hi @LekoArts - many thanks for responding. As mentioned this site is predominantly Markdown. As it is a technical docs site there are number of changes in MDXv2 (feature removals) that would make switching very difficult:
The time and effort for us to make the Markdown v2 compliant is far greater than converting the MDX to JS. I would love to be able to help produce a fix, however unfortunately I'm not a developer and only have basic Javascript knowledge. |
Beta Was this translation helpful? Give feedback.
-
Hi - we use Gatsby to run an internal docs site. The site is 75% markdown and the rest MDX (with some .js templates). With Gatsby v5 moving to MDXv2 we are having to remove all the MDX elements as v2 is causing us more problems than it does benefits.
We are therefore converting the MDX pages to plain JS. As we use frontmatter and graphql to sort the pages/create structure etc we have started using gatsby-transformer-javascript-frontmatter so that we can have frontmatter in JS to simulate what the MDX pages were allowing us to use.
Everything is working fine except we have warnings in the
develop
process:The test page code for the above warning is:
If I change the code to the other method listed in the gatsby-transformer-javascript-frontmatter example:
...the warning goes but when you visit the page in a browser, we get:
A help request on how to solve this was asked over a year ago, but there are no answers.
According to the Gatsby ESLint docs it is not possible (apparently) to disable
limited-exports-page-templates
as it is required??So how do we solve this issue? We have almost 500 MDX pages which will be moved to JS. This means ~500 warnings being displayed which is far from ideal.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions