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] Exclude demos from next.js eslint rules #39360

Closed
wants to merge 1 commit into from

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Oct 9, 2023

The lint rules shouldn't apply to the demos

See mui/mui-x#10619

@Janpot Janpot changed the title Exclude demos from next.js eslint rules [docs] Exclude demos from next.js eslint rules Oct 9, 2023
@Janpot Janpot added the docs Improvements or additions to the documentation label Oct 9, 2023
@mui-bot
Copy link

mui-bot commented Oct 9, 2023

Netlify deploy preview

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

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 50c30c4

@Janpot
Copy link
Member Author

Janpot commented Oct 9, 2023

This change was proposed to fix issues in MUI X where a demo contains <a> tags with a path-relative url to a docs page. These are problematic because

  1. they won't work in codesandbox
  2. they initiate a full page reload

ignoring this error is not the right way forward, instead:

  1. if it's not intended as a demo and more as a internal component: hide the demo toolbar and instead use next.js <Link /> components. This will avoid the full page reload
  2. if it's intended as a demo, then we can simply supply absolute urls to the <a> tags. This will have the same behavior as today, and also will work inside of codesandbox

@Janpot Janpot closed this Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants