-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Packages: Fix all missing or obsolete dependencies in packages #16969
Conversation
1e34cdb
to
000de40
Compare
000de40
to
bf67453
Compare
'import/no-extraneous-dependencies': 'error', | ||
}, | ||
excludedFiles: [ | ||
'**/*.@(android|ios|native).js', |
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.
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.
there is a follow-up: #16978
I wonder if there's any way we can check the JS files for imports and error if the dependency is not found in the |
So this new ESLint rule ( |
How did you know which dependencies to remove then? |
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.
Awesome!
It was a manual process. I went through |
* Packages: Fix all missing or obsolete dependencies in packages * Enable import/no-extraneous-dependencies rule and fix reported violations * Remove 2 dependencies not used in the project on the global level * Remove unused @wordpress/core-data dependnecy from @wordpress/block-editor
* Packages: Fix all missing or obsolete dependencies in packages * Enable import/no-extraneous-dependencies rule and fix reported violations * Remove 2 dependencies not used in the project on the global level * Remove unused @wordpress/core-data dependnecy from @wordpress/block-editor
Description
I discovered that we have some differences in the list of dependencies for WordPress packages. In particular, I have some issues integrating all recently published npm packages with WordPress core. Related ticket:
https://core.trac.wordpress.org/ticket/47843
How has this been tested?
In general, on Gutenberg side, it all should be transparent as we have build tools which properly generate dependencies consumed by WordPress. In core, we have to do it manually so that might be why it doesn't quite work as necessary.