-
-
Notifications
You must be signed in to change notification settings - Fork 15
Problem with unknown options #2
Comments
Ah, shoot. Deleting the key is probably the way to go - the options object is cloned before the function is called (so that we can manipulate it in exactly this sort of way without consequence). Though since the The alternative (and arguably more 'correct') approach would be to structure the options like... gobble( 'src' ).transform( '6to5', {
to5Options: {
blacklist: [ 'modules' ]
}
}); ...but I'm not really into that, it seems like overkill. |
That makes sense. It's probably the best solution. |
Damn, I tried to catch all of these when I was updating all the plugins to 6to5 3.0.0. I'll add |
@sebmck what about |
@stewartml What about it? |
Sorry for the brevity. Using I wonder though: surely it's the job of the plugins not to send bad options rather than babel to special case any options that might come in from plugins, or have I got the wrong end of the stick? |
@stewartml Yeah, |
The only reason I whitelisted some in the first place was to avoid having to go and update all the plugins as I'm not familiar at all with a large majority of the libraries that there are plugins for. |
I see, that's fair enough. I could submit a patch for |
Thanks guys, you're right about it not being babel's responsibility - I've chosen to fix this in gobble itself by treating I agree, it makes sense to allow Have published gobble 0.7.5 and gobble-babel 4.0.1 with this change. |
Thanks for this. You're right, I would just use |
Since v3.0.0, 6to5 throws when you supply an unknown option, which means this module fails due to this line. If there's no other way to configure gobble, the key should probably be deleted before passing options to 6to5.
The text was updated successfully, but these errors were encountered: