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

Support for comments #39

Open
ilyavolodin opened this issue Mar 11, 2015 · 1 comment
Open

Support for comments #39

ilyavolodin opened this issue Mar 11, 2015 · 1 comment

Comments

@ilyavolodin
Copy link
Owner

Currently this plugin will only support the following construct:

var view = Backbone.View.extend({ ... });

However, a lot of people create an object first, and then use extend on it.

var view = { ... };
return Backbone.View.extend(view);

In the case above, this plugin will not identify the view object as a Backbone View. It should be possible to add comments around an object, to specify that it's going to be Backbone View/Model/Collection like this:

/* Backbone.View */
var view = { ... };
/* Backbone.View end */
return Backbone.View.extend(view);
@platinumazure
Copy link
Contributor

Not that I would recommend trying to cover all cases, but for the simple cases, couldn't you use escope to read write references to the variable passed in to Backbone.View.extend (and similar)?

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

No branches or pull requests

2 participants