@@ -30,68 +30,68 @@ const tests = {
30
30
code : `
31
31
import { forwardRef } from 'react'
32
32
forwardRef((props, ref) => {
33
- return null
34
- })
33
+ return null;
34
+ });
35
35
` ,
36
36
} ,
37
37
{
38
38
code : `
39
39
import { forwardRef } from 'react'
40
- forwardRef((props, ref) => null)
40
+ forwardRef((props, ref) => null);
41
41
` ,
42
42
} ,
43
43
{
44
44
code : `
45
45
import { forwardRef } from 'react'
46
46
forwardRef(function (props, ref) {
47
- return null
48
- })
47
+ return null;
48
+ });
49
49
` ,
50
50
} ,
51
51
{
52
52
code : `
53
53
import { forwardRef } from 'react'
54
54
forwardRef(function Component(props, ref) {
55
- return null
56
- })
55
+ return null;
56
+ });
57
57
` ,
58
58
} ,
59
59
{
60
60
code : `
61
61
import * as React from 'react'
62
62
React.forwardRef((props, ref) => {
63
- return null
64
- })
63
+ return null;
64
+ });
65
65
` ,
66
66
} ,
67
67
{
68
68
code : `
69
69
import * as React from 'react'
70
- React.forwardRef((props, ref) => null)
70
+ React.forwardRef((props, ref) => null);
71
71
` ,
72
72
} ,
73
73
{
74
74
code : `
75
75
import * as React from 'react'
76
76
React.forwardRef(function (props, ref) {
77
- return null
78
- })
77
+ return null;
78
+ });
79
79
` ,
80
80
} ,
81
81
{
82
82
code : `
83
83
import * as React from 'react'
84
84
React.forwardRef(function Component(props, ref) {
85
- return null
86
- })
85
+ return null;
86
+ });
87
87
` ,
88
88
} ,
89
89
{
90
90
code : `
91
91
import * as React from 'react'
92
92
function Component(props) {
93
- return null
94
- }
93
+ return null;
94
+ };
95
95
` ,
96
96
} ,
97
97
] ) ,
@@ -100,30 +100,29 @@ const tests = {
100
100
code : `
101
101
import { forwardRef } from 'react'
102
102
forwardRef((props) => {
103
- return null
104
- })
103
+ return null;
104
+ });
105
105
` ,
106
106
errors : [
107
107
{
108
- message :
109
- 'forwardRef is used with this component but no ref parameter is set' ,
108
+ message : 'forwardRef is used with this component but no ref parameter is set' ,
110
109
suggestions : [
111
110
{
112
111
messageId : 'addRefParameter' ,
113
112
output : `
114
113
import { forwardRef } from 'react'
115
114
forwardRef((props, ref) => {
116
- return null
117
- })
115
+ return null;
116
+ });
118
117
` ,
119
118
} ,
120
119
{
121
120
messageId : 'removeForwardRef' ,
122
121
output : `
123
122
import { forwardRef } from 'react'
124
123
(props) => {
125
- return null
126
- }
124
+ return null;
125
+ };
127
126
` ,
128
127
} ,
129
128
] ,
@@ -133,25 +132,24 @@ const tests = {
133
132
{
134
133
code : `
135
134
import * as React from 'react'
136
- React.forwardRef((props) => null)
135
+ React.forwardRef((props) => null);
137
136
` ,
138
137
errors : [
139
138
{
140
- message :
141
- 'forwardRef is used with this component but no ref parameter is set' ,
139
+ message : 'forwardRef is used with this component but no ref parameter is set' ,
142
140
suggestions : [
143
141
{
144
142
messageId : 'addRefParameter' ,
145
143
output : `
146
144
import * as React from 'react'
147
- React.forwardRef((props, ref) => null)
145
+ React.forwardRef((props, ref) => null);
148
146
` ,
149
147
} ,
150
148
{
151
149
messageId : 'removeForwardRef' ,
152
150
output : `
153
151
import * as React from 'react'
154
- (props) => null
152
+ (props) => null;
155
153
` ,
156
154
} ,
157
155
] ,
@@ -162,30 +160,29 @@ const tests = {
162
160
code : `
163
161
import { forwardRef } from 'react'
164
162
forwardRef(function (props) {
165
- return null
166
- })
163
+ return null;
164
+ });
167
165
` ,
168
166
errors : [
169
167
{
170
- message :
171
- 'forwardRef is used with this component but no ref parameter is set' ,
168
+ message : 'forwardRef is used with this component but no ref parameter is set' ,
172
169
suggestions : [
173
170
{
174
171
messageId : 'addRefParameter' ,
175
172
output : `
176
173
import { forwardRef } from 'react'
177
174
forwardRef(function (props, ref) {
178
- return null
179
- })
175
+ return null;
176
+ });
180
177
` ,
181
178
} ,
182
179
{
183
180
messageId : 'removeForwardRef' ,
184
181
output : `
185
182
import { forwardRef } from 'react'
186
183
function (props) {
187
- return null
188
- }
184
+ return null;
185
+ };
189
186
` ,
190
187
} ,
191
188
] ,
@@ -196,30 +193,29 @@ const tests = {
196
193
code : `
197
194
import * as React from 'react'
198
195
React.forwardRef(function Component(props) {
199
- return null
200
- })
196
+ return null;
197
+ });
201
198
` ,
202
199
errors : [
203
200
{
204
- message :
205
- 'forwardRef is used with this component but no ref parameter is set' ,
201
+ message : 'forwardRef is used with this component but no ref parameter is set' ,
206
202
suggestions : [
207
203
{
208
204
messageId : 'addRefParameter' ,
209
205
output : `
210
206
import * as React from 'react'
211
207
React.forwardRef(function Component(props, ref) {
212
- return null
213
- })
208
+ return null;
209
+ });
214
210
` ,
215
211
} ,
216
212
{
217
213
messageId : 'removeForwardRef' ,
218
214
output : `
219
215
import * as React from 'react'
220
216
function Component(props) {
221
- return null
222
- }
217
+ return null;
218
+ };
223
219
` ,
224
220
} ,
225
221
] ,
0 commit comments