Recently, I encountered an issue with my Nuxt setup that is configured with el-lint and prettier. Every time I try to use 'this' within my template, it throws up an error unexpectedly.
6:15 error Unexpected usage of 'this' vue/this-in-template
7:15 error Unexpected usage of 'this' vue/this-in-template
11:15 error Unexpected usage of 'this' vue/this-in-template
12:15 error Unexpected usage of 'this' vue/this-in-template
I have been attempting to modify my .eslintrc.js file to resolve this issue, but so far I haven't been able to find the specific rule that would allow me to bypass this es-lint error.
Despite the error message, I am confident that the code is functioning correctly as I can observe the desired result appearing in the background behind the overlay.
<template>
<div class="slugWrapper">
<h1>this is {{ $route.params.slug }}</h1>
<div class="card">
<video
v-if="this.cards[0].type == 'Video'"
:src="this.cards[0].imageurl"
class="card__video"
@click="playPause" />
<img
v-if="this.cards[0].type=='Image'|| 'image/jpeg'"
:src="this.cards[0].imageurl"
class="card__image"
alt="Image">
</div>
</div>
I am seeking a solution or workaround to ignore the es lint error in this specific section of the code.