We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
vue/no-ref-as-operand
computed
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
What rule do you want to change? vue/no-ref-as-operand
Does this change cause the rule to produce more or fewer warnings? more warning
How will the change be implemented? (New option, new default behavior, etc.)? Make vue/no-ref-as-operand also consider computed
Please provide some example code that this change will affect:
const count = ref(0) const isEven = computed(() => count.value % 2 === 0) watchEffect(() => { // warning at here if (isEven) { console.log('is even') } })
What does the rule currently do for this code? no warning
What will the rule do after it's changed? Warning about incorrect usage for computed
Additional context
The text was updated successfully, but these errors were encountered:
I can't reproduce it. I think isEven is already warned.
isEven
https://ota-meshi.github.io/eslint-plugin-vue-demo/#eJxNT8uqwjAQ/ZVD4GIKYi8uL8adf5FNiRMNtJOSTOqi9N9N6BXcDec5Z1Uu3kn9KcuX7FKYBZmkzFfLYZpjEqxI5I9wcZqL0P2I1yDuefOenGCDT3GCVUshWzNc5CxVW1hgmlH/dh805NtCXOFPlNYdzHVXn5ZhLIQfnGGMQXNZ/mr6166Wgb6vPyQO/MAgeFKihgYPvVd0uwxovXGk0xgf+hAyqJKHrnGb5a0el37fXNeq7Q3CT1lg
Sorry, something went wrong.
I tried it again. We didn't see a warning because we use unplugin-auto-import.
I tried on the document's interactive demo
without import => no warning
with import => has warning
Duplicate of #1969 Follow #1969.
Thanks
No branches or pull requests
What rule do you want to change?
vue/no-ref-as-operand
Does this change cause the rule to produce more or fewer warnings?
more warning
How will the change be implemented? (New option, new default behavior, etc.)?
Make
vue/no-ref-as-operand
also considercomputed
Please provide some example code that this change will affect:
What does the rule currently do for this code?
no warning
What will the rule do after it's changed?
Warning about incorrect usage for
computed
Additional context
The text was updated successfully, but these errors were encountered: