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

Add vue/no-deprecated-destroyed-lifecycle rule #1211

Merged
merged 2 commits into from Jun 26, 2020

Conversation

ota-meshi
Copy link
Member

This PR adds vue/no-deprecated-destroyed-lifecycle rule.

The vue/no-deprecated-destroyed-lifecycle rule reports use of deprecated destroyed and beforeDestroy lifecycle hooks.

Copy link
Contributor

@sosukesuzuki sosukesuzuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disclaimer: I'm a not maintainer.

`
}
],
invalid: [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add tests for computed properties? I'm not sure if this is a expected behavior but current implementation also warn for below code:

export default {
  ["destroyed"]() {}
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review!

It is the expected behavior to report. But I should add a test case. In especially, I should test if suggest works.

Copy link
Contributor

@sosukesuzuki sosukesuzuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ota-meshi ota-meshi merged commit a12f2d9 into master Jun 26, 2020
@ota-meshi ota-meshi deleted the add-rule/no-deprecated-destroyed-lifecycle branch June 26, 2020 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants