-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Framework: Use imports for WordPress modules instead of the wp
global
#1332
Conversation
Love it. Do you think we can remove the wp global from eslint too, for better testing? |
If we need it anywhere else for external stuff, we can force |
@iseulde Not against it, but maybe there're too much |
Hm, ran it and it passes? |
Aha forgot it inherits from other config. Will remove commit |
369681d
to
a9ad2f0
Compare
In that case, can we change that with Webpack? It seems strange to still have both after this PR. |
Mostly asking because I'm not sure how we'll prevent it from being introduced again unknowingly. |
I'm trying but failing to define these modules in webpack. It seems to accept |
Oh, this has been attempted before: #742. |
Yeah, |
Yeah, I'm thinking we'd need to add a namespace to resolve this Anyway, I'm keen to merge this as a first step and see how to solve the external wp modules issue. |
blocks/editable/index.js
Outdated
@@ -19,7 +20,7 @@ import './style.scss'; | |||
import FormatToolbar from './format-toolbar'; | |||
import TinyMCE from './tinymce'; | |||
|
|||
function createElement( type, props, ...children ) { | |||
function createTinymceElement( type, props, ...children ) { |
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.
Capitalization: We should probably prefer TinyMCE
, createTinyMCEElement
a9ad2f0
to
ce6bde0
Compare
part of #1205
I would appreciate a quick review for this to avoid many conflicts :)