You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<script setup lang="ts">
const a =$ref(0);console.log(a+1);
</script>
<template>
<div>div</div>
</template>
What did you expect to happen?
No lint error
What actually happened?
/Users/leonzalion/projects/eslint-bug/src/App.vue
3:13 error Operands of '+' operation must either be both strings or both numbers @typescript-eslint/restrict-plus-operands
✖ 1 problem (1 error, 0 warnings)
ELIFECYCLE Command failed with exit code 1.
The text was updated successfully, but these errors were encountered:
leonsilicon
changed the title
using $ref sugar with $ref(0) conflicts with @typescript-eslint/restrict-plus-operands rule
using $ref sugar with $ref(number) conflicts with @typescript-eslint/restrict-plus-operands rule
Apr 5, 2022
If you want to solve it, please suggest a feature to typescript-eslint.
I think the issue posted in the past will be helpful. typescript-eslint/typescript-eslint#2506
I close the issue, because we can't do anything with this repository.
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen?
No lint error
What actually happened?
Repository to reproduce this issue
https://github.com/leonzalion/vue-ref-eslint-bug
The text was updated successfully, but these errors were encountered: