Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue/no-ref-as-operand not catching computed refs #2454

Open
2 tasks done
chetan opened this issue Apr 22, 2024 · 0 comments
Open
2 tasks done

vue/no-ref-as-operand not catching computed refs #2454

chetan opened this issue Apr 22, 2024 · 0 comments

Comments

@chetan
Copy link

chetan commented Apr 22, 2024

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: 8.57.0
  • eslint-plugin-vue version: 9.25.0
  • Vue version: 3.4.24
  • Node version: v20.12.1
  • Operating System: macOS 14 (Sonoma)

What did you do?

    const count = ref(0)
    const ok = ref(true)

    const notok = computed(() => !ok.value)
    if (notok || !ok) {
      console.log("not ok!!")
    }

What did you expect to happen?

notok should be flagged as a problem in the condition above.

What actually happened?

Only !ok is flagged.

It's happening in my local env but I am able to reproduce in the web docs:

Screenshot 2024-04-22 at 11 38 42 AM

Repository to reproduce this issue

can provide more info on my local configs if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant