Skip to content

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Aug 6, 2025

Lint rule to disallow usage of typescript namespaces. We've seen at least two problems with them:

Gauging the ecosystem it also looks like support for namespaces in tooling is poor and tends to be treated as a deprecated feature. Propose to shy away from it to avoid other future problems.

  • Leaving to the authors to refactor other usage
  • The usage in chai is allowed, no other way to achieve this on legacy code.
  • Will move this rule to code infra eventually

@Janpot Janpot added scope: code-infra Changes related to the core-infra product. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. labels Aug 6, 2025
@mui-bot
Copy link

mui-bot commented Aug 6, 2025

Deploy preview: https://deploy-preview-19071--material-ui-x.netlify.app/

Bundle size report

Bundle Parsed Size Gzip Size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid/DataGrid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro/DataGridPro 0B(0.00%) 🔺+1B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium/DataGridPremium 0B(0.00%) ▼-1B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 🔺+1B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) ▼-1B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 32e7497

@Janpot Janpot marked this pull request as ready for review August 6, 2025 07:51
@oliviertassinari oliviertassinari changed the title [infra] Remove namespaces [code-infra] Remove namespaces Aug 9, 2025
@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 9, 2025

This pattern leads to broken bundling in codesandbox.

Ah yes, I was about to open an issue (it's broken in codesandbox), but landed here instead.

Co-authored-by: Bernardo Belchior <Bernardo.belchior1@gmail.com>
Signed-off-by: Jan Potoms <2109932+Janpot@users.noreply.github.com>
@Janpot Janpot requested a review from romgrk August 11, 2025 10:02
@Janpot Janpot merged commit 1caafba into mui:master Aug 11, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: code-infra Changes related to the core-infra product. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants