When I am working with a js file that starts with a hashbang like #!/usr/bin/env node, and I try to run a js2-refactor command, I get "js2r--guard: Can't refactor while buffer has parse errors". It would awesome if hashbangs didn't lead to parse errors!
Agreed! For this to work, the js2-mode parser that we're using needs to be changed to ignore the hashbang. It seems to be under development still: https://github.com/mooz/js2-mode
When I am working with a js file that starts with a hashbang like
#!/usr/bin/env node
, and I try to run a js2-refactor command, I get "js2r--guard: Can't refactor while buffer has parse errors". It would awesome if hashbangs didn't lead to parse errors!