🌐 AI搜索 & 代理 主页
Skip to content

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.

3 participants