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

Rule proposal: no-implicit-parent-communication #257

Open
michalsnik opened this issue Nov 26, 2017 · 3 comments
Open

Rule proposal: no-implicit-parent-communication #257

michalsnik opened this issue Nov 26, 2017 · 3 comments

Comments

@michalsnik
Copy link
Member

Style guide:
https://vuejs.org/v2/style-guide/#Implicit-parent-child-communication-use-with-caution

Description:
This rule would disallow usage of this.$parent in vue components. It is recommend to use props instead.

There are few cases when it's better to use this.$parent though, but it's better to make a conscious decision after seeing a warning than directly relying on parent.

@mateuszRybczonek
Copy link

I will start working on that one.

@chrisvfritz
Copy link
Contributor

This sounds good. 🙂 Unfortunately, situations where it might be OK to use $parent are probably too subjective to put this in any category, so I think this should probably an an uncategorized opt-in.

@armano2
Copy link
Collaborator

armano2 commented Nov 8, 2018

@mateuszRybczonek are you working on it?

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

4 participants