-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add no-computed-without-dependent-keys
rule
#346
base: master
Are you sure you want to change the base?
Add no-computed-without-dependent-keys
rule
#346
Conversation
const ember = require('../utils/ember'); | ||
|
||
//------------------------------------------------------------------------------ | ||
// General rule - Don't introduce side-effects in computed properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comment banner will need to be updated or removed
message: 'A computed property needs dependent keys' | ||
}] | ||
}, | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add tests for a few of the common computed property macros?
Also realized we'll need to ignore volatile computeds for this rule. |
4823a98
to
99ae07b
Compare
no-computed-without-dependent-keys
rule
I'd love to land this. @gmurphey - Have any cycles to address the feedback and rebase? |
Thoughts on using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also need to add an invalid
test for:
export default Ember.Component({
foo: computed({
get() {
return this.get('bar') * 2;
}
})
});
Todo: