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
Copy file name to clipboardExpand all lines: docs/rules/no-unnecessary-state-wrap.md
+20-1
Original file line number
Diff line number
Diff line change
@@ -65,13 +65,15 @@ Therefore, wrapping them with `$state` is unnecessary and can lead to confusion.
65
65
"svelte/no-unnecessary-state-wrap": [
66
66
"error",
67
67
{
68
-
"additionalReactiveClasses": []
68
+
"additionalReactiveClasses": [],
69
+
"allowReassign": false
69
70
}
70
71
]
71
72
}
72
73
```
73
74
74
75
-`additionalReactiveClasses` ... An array of class names that should also be considered reactive. This is useful when you have custom classes that are inherently reactive. Default is `[]`.
76
+
-`allowReassign` ... If `true`, allows `$state` wrapping of reactive classes when the variable is reassigned. Default is `false`.
75
77
76
78
### Examples with Options
77
79
@@ -90,6 +92,23 @@ Therefore, wrapping them with `$state` is unnecessary and can lead to confusion.
0 commit comments