js-refactor
js-refactor copied to clipboard
Support ES6+
- [x] Basic parser support
- [ ] ES6/ES2015 features
- [x] import
- [x] let/const
- [x] arrow function
- [x] generator
- [x] array destructuring
- [x] object destructuring
- [ ] rest spread
- [ ] Stage 2
- [x] async function
- [ ] object rest spread
- [ ] Stage 1
- [ ] decorators
- [ ] Stage 0
- [ ] function bind operators
Is there any way we can get support for let/const sooner rather than later? I'm not sure exactly how this is implemented, but since it works for traditional var declarations it doesn't seem it should be too difficult? Renaming variables is probably the most common use case. Right now, I suspect there are a lot of folks writing ES6, and this is kind of a Big Deal to us.
@sarink Rename let/const already worked, if you find any cases it doesn't work, pls create a issue with the code sample. Thank you!
It would also be great if the plugin would take annotations into account. :)
e.g.
function foo(bar: Annotation) {
...
}
Doing a rename of bar includes the annotation in the refactor, which causes weird behaviour.
I know this may not be consider "official" javascript, however, typing annotations are becoming a lot more prevalent with the growth of Typescript and Flow. I did overhear that the ":" and postfix is/was going to be introduced as a reserved space in the javascript specification, however, I am struggling to find any information on this.
@ctrlplusb #20
Do you have plan to support ES6 class, class' method/property and class' static method/property?
@gluons It's hard to analyze property usage because they are not local bindings and can be used anywhere.
OK. 👌 I understand.