JS.VUE.NO.DEPRECATED.DESTROYED.LIFECYCLE

Disallow using deprecated 'destroyed' and 'beforeDestroy' lifecycle hooks (in Vue.js 3.0.0+)

Rule Details

This rule reports use of deprecated destroyed and beforeDestroy lifecycle hooks. (in Vue.js 3.0.0+).

{'vue/no-deprecated-destroyed-lifecycle': ['error']}

Copy
<script>
export default {
  /* GOOD */
  beforeMount () {},
  mounted () {},
  beforeUnmount () {},
  unmounted () {},

  /* BAD */
  beforeDestroy () {},
  destroyed () {}
}
</script>

Options

Nothing.

The content on this page is adapted from the ESLint User Guide. Copyright © OpenJS Foundation and other contributors, www.openjsf.org. All rights reserved. https://eslint.org/docs/rules/