asgerf / bracket-rename

Rename refactoring for bracket
MIT License
14 stars 2 forks source link

Support ES6 syntax / arrow functions #7

Open mmagyar opened 9 years ago

mmagyar commented 9 years ago

Currently the plugin will respond with a syntax error message if there are ES6 contructs in the code like fat arrow functions

asgerf commented 9 years ago

There should now be support for some ES6 syntax such as arrow functions, let bindings, and default parameter values. Classes are not supported.

Please try it out and report back. I haven't tested it very well since I don't have any good tests that use ES6 features.

mmagyar commented 9 years ago

Thanks! It works great with arrow function, handles 'this' correctly as well, let and const are okay too.

bruslim commented 9 years ago

doesn't handle import

asgerf commented 9 years ago

There should now be basic support for import and export.

Note that multi-file renaming is still not supported (and is not planned), but it does not crash any more when your file has an import or export.

bruslim commented 9 years ago

handles import and export :+1: