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

Removed all imports from barrel files for components, actions, helpers, hooks and lodash #6509

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pnicolli
Copy link
Contributor

@pnicolli pnicolli commented Dec 2, 2024

Closes #6507

@pnicolli pnicolli requested a review from a team December 2, 2024 19:55
@pnicolli pnicolli self-assigned this Dec 2, 2024
Copy link

netlify bot commented Dec 2, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 0a4b597
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/674e206b9f7f5c00086aca7e

Comment on lines +36 to +52
"import/named": "error",
"react/jsx-filename-extension": [1, { "extensions": [".tsx", ".jsx"] }],
"no-restricted-imports": [
"error",
{
"name": "@plone/volto/components",
"message": "Importing from barrel files is not allowed. Please use direct imports of the modules instead."
},
{
"name": "@plone/volto/helpers",
"message": "Importing from barrel files is not allowed. Please use direct imports of the modules instead."
},
{
"name": "@plone/volto/actions",
"message": "Importing from barrel files is not allowed. Please use direct imports of the modules instead."
}
],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sneridagh this eslint setup for some reason still doesn't work in the editor for me so I could properly try this.

@pnicolli
Copy link
Contributor Author

pnicolli commented Dec 2, 2024

@stevepiercy I realized the deprecation docs for this already existed, I added a couple extra files I cleaned up.

@pnicolli
Copy link
Contributor Author

pnicolli commented Dec 2, 2024

FYI: this PR also reduces the main client bundle size by almost 30kb gzipped! Just by removing the imports from barrel files!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs discussion
Development

Successfully merging this pull request may close these issues.

Remove any usage of barrel files from core
1 participant