@@ -151,9 +151,9 @@ ruleTester.run('no-unsafe', rule, {
151151 newMethod : 'componentDidMount' ,
152152 details : 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html.' ,
153153 } ,
154- line : 2 ,
155- column : 9 ,
156- type : 'ClassDeclaration ' ,
154+ line : 3 ,
155+ column : 11 ,
156+ type : 'MethodDefinition ' ,
157157 } ,
158158 {
159159 messageId : 'unsafeMethod' ,
@@ -162,9 +162,9 @@ ruleTester.run('no-unsafe', rule, {
162162 newMethod : 'getDerivedStateFromProps' ,
163163 details : 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html.' ,
164164 } ,
165- line : 2 ,
166- column : 9 ,
167- type : 'ClassDeclaration ' ,
165+ line : 4 ,
166+ column : 11 ,
167+ type : 'MethodDefinition ' ,
168168 } ,
169169 {
170170 messageId : 'unsafeMethod' ,
@@ -173,9 +173,9 @@ ruleTester.run('no-unsafe', rule, {
173173 newMethod : 'componentDidUpdate' ,
174174 details : 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html.' ,
175175 } ,
176- line : 2 ,
177- column : 9 ,
178- type : 'ClassDeclaration ' ,
176+ line : 5 ,
177+ column : 11 ,
178+ type : 'MethodDefinition ' ,
179179 } ,
180180 ] ,
181181 } ,
@@ -196,9 +196,9 @@ ruleTester.run('no-unsafe', rule, {
196196 newMethod : 'componentDidMount' ,
197197 details : 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html.' ,
198198 } ,
199- line : 2 ,
200- column : 9 ,
201- type : 'ClassDeclaration ' ,
199+ line : 3 ,
200+ column : 11 ,
201+ type : 'MethodDefinition ' ,
202202 } ,
203203 {
204204 messageId : 'unsafeMethod' ,
@@ -207,9 +207,9 @@ ruleTester.run('no-unsafe', rule, {
207207 newMethod : 'getDerivedStateFromProps' ,
208208 details : 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html.' ,
209209 } ,
210- line : 2 ,
211- column : 9 ,
212- type : 'ClassDeclaration ' ,
210+ line : 4 ,
211+ column : 11 ,
212+ type : 'MethodDefinition ' ,
213213 } ,
214214 {
215215 messageId : 'unsafeMethod' ,
@@ -218,9 +218,9 @@ ruleTester.run('no-unsafe', rule, {
218218 newMethod : 'componentDidUpdate' ,
219219 details : 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html.' ,
220220 } ,
221- line : 2 ,
222- column : 9 ,
223- type : 'ClassDeclaration ' ,
221+ line : 5 ,
222+ column : 11 ,
223+ type : 'MethodDefinition ' ,
224224 } ,
225225 ] ,
226226 } ,
@@ -243,9 +243,9 @@ ruleTester.run('no-unsafe', rule, {
243243 newMethod : 'componentDidMount' ,
244244 details : 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html.' ,
245245 } ,
246- line : 2 ,
247- column : 38 ,
248- type : 'ObjectExpression ' ,
246+ line : 3 ,
247+ column : 11 ,
248+ type : 'Property ' ,
249249 } ,
250250 {
251251 messageId : 'unsafeMethod' ,
@@ -254,9 +254,9 @@ ruleTester.run('no-unsafe', rule, {
254254 newMethod : 'getDerivedStateFromProps' ,
255255 details : 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html.' ,
256256 } ,
257- line : 2 ,
258- column : 38 ,
259- type : 'ObjectExpression ' ,
257+ line : 4 ,
258+ column : 11 ,
259+ type : 'Property ' ,
260260 } ,
261261 {
262262 messageId : 'unsafeMethod' ,
@@ -265,9 +265,9 @@ ruleTester.run('no-unsafe', rule, {
265265 newMethod : 'componentDidUpdate' ,
266266 details : 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html.' ,
267267 } ,
268- line : 2 ,
269- column : 38 ,
270- type : 'ObjectExpression ' ,
268+ line : 5 ,
269+ column : 11 ,
270+ type : 'Property ' ,
271271 } ,
272272 ] ,
273273 } ,
@@ -288,9 +288,9 @@ ruleTester.run('no-unsafe', rule, {
288288 newMethod : 'componentDidMount' ,
289289 details : 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html.' ,
290290 } ,
291- line : 2 ,
292- column : 38 ,
293- type : 'ObjectExpression ' ,
291+ line : 3 ,
292+ column : 11 ,
293+ type : 'Property ' ,
294294 } ,
295295 {
296296 messageId : 'unsafeMethod' ,
@@ -299,9 +299,9 @@ ruleTester.run('no-unsafe', rule, {
299299 newMethod : 'getDerivedStateFromProps' ,
300300 details : 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html.' ,
301301 } ,
302- line : 2 ,
303- column : 38 ,
304- type : 'ObjectExpression ' ,
302+ line : 4 ,
303+ column : 11 ,
304+ type : 'Property ' ,
305305 } ,
306306 {
307307 messageId : 'unsafeMethod' ,
@@ -310,9 +310,9 @@ ruleTester.run('no-unsafe', rule, {
310310 newMethod : 'componentDidUpdate' ,
311311 details : 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html.' ,
312312 } ,
313- line : 2 ,
314- column : 38 ,
315- type : 'ObjectExpression ' ,
313+ line : 5 ,
314+ column : 11 ,
315+ type : 'Property ' ,
316316 } ,
317317 ] ,
318318 } ,
0 commit comments