-
-
Notifications
You must be signed in to change notification settings - Fork 675
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
Error for ref in condition #2140
Comments
It seems we should not use ref without unref anywhere...like arguments for functions. |
You should use @typescript-eslint/no-unnecessary-condition. |
A rule catching this is indeed hard to get right without TypeScript, so I'd also suggest @typescript-eslint/no-unnecessary-condition. Duplicating (part of) this rule in eslint-plugin-vue seems to be much work with little gain, while always missing some cases that should be reported. |
Thanks! I will try this out. |
Please describe what the rule should do:
Should give an error when user use a ref value as condition assert.
What category should the rule belong to?
[ ] Enforces code style (layout)
[x] Warns about a potential error (problem)
[x] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
Additional context
No additional context
The text was updated successfully, but these errors were encountered: