eslint-plugin-ember icon indicating copy to clipboard operation
eslint-plugin-ember copied to clipboard

avoid-leaking-state-in-ember-objects should warn about myProp: A()

Open ntgussoni opened this issue 6 years ago • 3 comments

We recently found that the rule does not warn you if you do:

myProp: A()

And yet the state is leaked. I bet the same happens with EmberObject().

Shouldn't this rule also apply in these cases?

ntgussoni avatar Oct 10 '18 16:10 ntgussoni

Completely agree, we should specfically ensure that Ember.A() is still flagged.

rwjblue avatar Nov 08 '18 20:11 rwjblue

@rwjblue I'd like to try fixing this. Never worked on an eslint rule before, so it's good practice. Is that ok?

ntgussoni avatar Nov 09 '18 00:11 ntgussoni

There it goes! Any feedback is much appreciated.

ntgussoni avatar Nov 09 '18 03:11 ntgussoni