-
-
Notifications
You must be signed in to change notification settings - Fork 696
New Add vue/no-computed-in-data
Rule
#1075
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
New Add vue/no-computed-in-data
Rule
#1075
Conversation
almost finish #958
@ota-meshi could please help for review?
vue/no-computed-in-data
Rule (追記ここまで)
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.
Sorry for the late reply.
I have change requests.
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.
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.
There is no need to use startsWith.
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.
Vue components may not be at the top level.
export default { components: { // @vue/component MyComponent: { data() { return { bar: this.baz } }, computed: { baz() {} } } }, }
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.
I've found an issue with duplicate reports when the chain is deep. Perhaps checking the parent
is a problem.
<script> export default { data() { return { a: this.test.foo.bar.baz, } }, computed: { test() { return {} }, } } </script>
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.
Why is there a console.assert
call here?
This PR seems to be out of date, so I will close it.
Uh oh!
There was an error while loading. Please reload this page.
Fixes: #958