Origins of the $log
variable:
Vue.prototype.$log = console.log
Restricted Areas:
<template>
<!-- Restricted Area 1 -->
<div @click="$log">
<!-- Restricted Area 2 -->
{{ $log }}
<!-- Restricted Area 3 -->
{{ $log('foo') }}
</div>
</template>
<script>
import Vue from 'vue'
// Restricted Area 4
Vue.prototype.$log('foo')
export default {
created() {
// Restricted Area 5
this.$log('foo')
},
}
</script>
Additional Resources for Assistance:
- ESLint - How to restrict property of
this
- no-restricted-syntax
- vue/no-restricted-syntax