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
@@ -20,6 +21,8 @@ function isNodeDestructuring(node) {
20
21
constmessages={
21
22
useStateErrorMessage: 'useState call is not destructured into value + setter pair',
22
23
useStateErrorMessageOrAddOption: 'useState call is not destructured into value + setter pair (you can allow destructuring by enabling "allowDestructuredState" option)',
24
+
suggestPair: 'Destructure useState call into value + setter pair',
25
+
suggestMemo: 'Replace useState call with useMemo',
23
26
};
24
27
25
28
module.exports={
@@ -67,7 +70,10 @@ module.exports = {
67
70
context,
68
71
messages.useStateErrorMessage,
69
72
'useStateErrorMessage',
70
-
{ node }
73
+
{
74
+
node,
75
+
suggest: false,
76
+
}
71
77
);
72
78
return;
73
79
}
@@ -104,21 +110,23 @@ module.exports = {
104
110
105
111
if(!isSymmetricGetterSetterPair){
106
112
constsuggestions=[
107
-
{
108
-
desc: 'Destructure useState call into value + setter pair',
0 commit comments