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
Whenever someone wants to use reactive over ref for whatever reason it is really easy to lose reactivity on that object since you can just reassign the value. Enforcing the usage of 'const' or show a message that you can't do just, just like you get an warning when reassigning a ref value without .value.
What category should the rule belong to?
[X] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
let data = reactive({}) // reactive assign only on const
data = {} // no error, but will lose reactivity. should throw error that this isn't possible.
// Example of enforcing this on .value which already works.
let test1 = ref({})
test1 = {} // Must use `.value` to read or write the value wrapped by
The text was updated successfully, but these errors were encountered:
Please describe what the rule should do:
Whenever someone wants to use reactive over ref for whatever reason it is really easy to lose reactivity on that object since you can just reassign the value. Enforcing the usage of 'const' or show a message that you can't do just, just like you get an warning when reassigning a ref value without .value.
What category should the rule belong to?
[X] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
The text was updated successfully, but these errors were encountered: