-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add Babel 5 plugin stripping "data-test-*" properties #45
Conversation
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!
So what happens if I have a: myProperty: computed(function() {
let myCustomHash = {
"data-test-ignored": "yes or no"
};
doSomethingWithMyCustomHash(myCustomHash);
}) Then this hash would be touched as well, right? |
@pangratz correct. I initially wrote it only for properties in |
I would say it is a use case which shouldn't occur that often really. But if I would have such a use case, I would expect it not to be stripped I guess 🤔 . This is though. Only restricting to |
FWIW you can still do this: myProperty: computed(function() {
let myCustomHash = {};
myCustomHash["data-test-ignored"] = "yes or no";
doSomethingWithMyCustomHash(myCustomHash);
}) |
Yeah, good point. I guess this is not really an issue since the use case I posted would be a really special one. |
This plugin will be added automatically to the Babel configuration of the host app and removes all
data-test-*
properties that it finds in JS code.