6 Commits

Author SHA1 Message Date
Amjad Masad
30bb38c4bb Update scope binding info after transforming block-scoped bindings
When convert a const, let or any other block-bound binding to a var we
forget to update the scope info. This confuses other transforms that may
come after this as to which scope does the binding belongs to.

This also uncovered an issue where duplicate block-scoped bindings were allowed
to co-exist.
2016-03-01 17:03:06 -08:00
Amjad Masad
0d8e5a9e86 Fix over-parenthesizing of function expressions 2015-12-24 14:55:51 -08:00
Amjad Masad
a17d62ca2b Convert the constants transform plugin to a validation plugin
A follow up from https://github.com/babel/babel/pull/2969 were we added support for consts in the block-scoping plugin.
2015-11-11 10:45:31 -08:00
Amjad Masad
aa8b96bf38 Support consts in block-scoping transform 2015-11-11 10:42:55 -08:00
Amjad Masad
4cca0abd2f move them to the correct place 2015-11-11 10:42:54 -08:00
Sebastian McKenzie
15969a0904 move all plugin tests out of babel-core and into their appropriate folders 2015-11-08 23:04:10 -08:00