Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignores files with object destructuring #70

Closed
selvagsz opened this issue Aug 5, 2015 · 3 comments
Closed

Ignores files with object destructuring #70

selvagsz opened this issue Aug 5, 2015 · 3 comments

Comments

@selvagsz
Copy link
Contributor

selvagsz commented Aug 5, 2015

Ran methodify command on a test repo but throws the following error

app/routes/application.js - Line 3: Unexpected identifier

// routes/application.js
import Ember from 'ember';

const { get, set } = Ember;

export default Ember.Route.extend({
  model: function() {
    //some stuff
  },

  setupController: function(controller, context) {
    //some extra stuffs
    this._super(controller, context);
  }
});

Related to #30

@marcioj
Copy link
Collaborator

marcioj commented Aug 6, 2015

Hi @selvagsz thanks for report!

Probably this is a recast issue due to get and set be keywords

var recast = require('recast');
recast.parse('const { get, set } = Ember;'); // Error: Line 1: Unexpected identifier
recast.parse('const { foo, bar } = Ember;'); // { ast object }

I'll dig more into this tonight

@marcioj
Copy link
Collaborator

marcioj commented Aug 19, 2015

Fixed in 0.6.3. Thanks for open the issue!

@selvagsz
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants