ilyavolodin / eslint-plugin-backbone

Backbone specific linting rules for ESLint
MIT License
95 stars 11 forks source link

Rule to not use this.model.attributes or this.collection.models #11

Closed davetodd closed 10 years ago

davetodd commented 10 years ago

This wouldn't cover every instance, but it should be possible if you're in a view to detect that this.model.attributes was used instead of this.model.set() or get(). Likewise, there are usually better methods to use to operate on the collection than going directly to this.collection.models.

ilyavolodin commented 10 years ago

This rule needs to be broken up into a bunch of separate rules. View should not access this.model.attributes and this.model.models or this.collection.models. Models should not access this.attributes and collections should not access this.models. I'll create 4 new issues and close this one.

ilyavolodin commented 10 years ago

Closing in favor of #15 #16 #17 and #18