eslint-plugin-vue
eslint-plugin-vue copied to clipboard
vue/no-side-effects-in-computed-properties does not work with vue-demi
Checklist
- [x] I have tried restarting my IDE and the issue persists.
- [x] I have read the FAQ and my problem is not listed.
Tell us about your environment
- ESLint version: v7.26.0
- eslint-plugin-vue version: ^7.9.0
- Node version: v14.15.4
- Operating System: ubuntu 20.04 LTS
Please show your full configuration:
// PRIVATE CONFIG BUT USING plugin:vue/recommended
What did you do?
<script lang="ts">
import { computed, defineComponent, ref } from 'vue-demi'
export default defineComponent({
...
setup () {
const foo = ref(0)
const bar = computed(() => {
foo.value = 1 // SIDE EFFECT
return true
})
}
})
</script>
What did you expect to happen?
Fire vue/no-side-effects-in-computed-properties
rule as it's marked as error
and after debugging it a bit seems like not parsing computed fields as computed nodes.