formatter for vue+eslint

https://alligator.io/vuejs/eslint-vue-vetur/


using eslint as default formatter instead of prettier

bed code:
<script>
/* ✗ BAD */
export default {
  computed: {
    fullName () {
      this.firstName = 'lorem' // <- side effect
      return `${this.firstName} ${this.lastName}`
    },
    reversedArray () {
      return this.array.reverse() // <- side effect - orginal array is being mutated
    }
  }
}
</script>
should be this way:
return [...this.array].reverse()

Comments

Popular posts from this blog

About GraphQL - Downside