Skip to content

Latest commit

 

History

History
55 lines (45 loc) · 1.13 KB

no-use-computed-property-like-method.md

File metadata and controls

55 lines (45 loc) · 1.13 KB
pageClass sidebarDepth title description
rule-details
0
vue/no-use-computed-property-like-method
disallow use computed property like method

vue/no-use-computed-property-like-method

disallow use computed property like method

📖 Rule Details

This rule disallows to use computed property like method.

<template>
  <div>
  </div>
</template>

<script>
  export default {
    props: {
      name: {
        type: String
      },
    },
    computed: {
      isExpectedName() {
        return this.name === 'name';
      }
    },
    methods: {
      getName() {
        return this.isExpectedName
      },
      getNameCallLikeMethod() {
        return this.isExpectedName()
      }
    }
  }
</script>

🔧 Options

Nothing.

🔍 Implementation