<template>
<div v-if="['vue', 'pinia'].indexOf(pkg) > -1" />
</template>
<script setup lang="ts">
const pkg = 'vue'
console.log(['vue', 'pinia'].indexOf(pkg) > -1)
</script>
I added the rule 'unicorn/prefer-includes': 'error'
to my project, which checks for and replaces .indexOf()
with .includes()
. While this works properly within the <script>
block of a Vue SFC, it fails to detect issues within the <template>
block.
I attempted to add checkVueTemplate
to the prefer-includes.js
rule to catch errors within the <template>
block. However, I encountered issues with the automatic fixes not working as expected. Is there a way to resolve this problem?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too