@@ -111,42 +111,24 @@ ruleTester.run('no-deprecated-destroyed-lifecycle', rule, {
111
111
}
112
112
</script>
113
113
` ,
114
- errors : [
115
- {
116
- message :
117
- 'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.' ,
118
- line : 4 ,
119
- suggestions : [
120
- {
121
- desc : 'Instead, change to `beforeUnmount`.' ,
122
- output : `
114
+ output : `
123
115
<script>
124
116
export default {
125
117
beforeUnmount () {},
126
- destroyed () {},
118
+ unmounted () {},
127
119
}
128
120
</script>
129
- `
130
- }
131
- ]
121
+ ` ,
122
+ errors : [
123
+ {
124
+ message :
125
+ 'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.' ,
126
+ line : 4
132
127
} ,
133
128
{
134
129
message :
135
130
'The `destroyed` lifecycle hook is deprecated. Use `unmounted` instead.' ,
136
- line : 5 ,
137
- suggestions : [
138
- {
139
- desc : 'Instead, change to `unmounted`.' ,
140
- output : `
141
- <script>
142
- export default {
143
- beforeDestroy () {},
144
- unmounted () {},
145
- }
146
- </script>
147
- `
148
- }
149
- ]
131
+ line : 5
150
132
}
151
133
]
152
134
} ,
@@ -160,42 +142,24 @@ ruleTester.run('no-deprecated-destroyed-lifecycle', rule, {
160
142
}
161
143
</script>
162
144
` ,
163
- errors : [
164
- {
165
- message :
166
- 'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.' ,
167
- line : 4 ,
168
- suggestions : [
169
- {
170
- desc : 'Instead, change to `beforeUnmount`.' ,
171
- output : `
145
+ output : `
172
146
<script>
173
147
export default {
174
148
beforeUnmount:beforeDestroy,
175
- destroyed,
149
+ unmounted: destroyed,
176
150
}
177
151
</script>
178
- `
179
- }
180
- ]
152
+ ` ,
153
+ errors : [
154
+ {
155
+ message :
156
+ 'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.' ,
157
+ line : 4
181
158
} ,
182
159
{
183
160
message :
184
161
'The `destroyed` lifecycle hook is deprecated. Use `unmounted` instead.' ,
185
- line : 5 ,
186
- suggestions : [
187
- {
188
- desc : 'Instead, change to `unmounted`.' ,
189
- output : `
190
- <script>
191
- export default {
192
- beforeDestroy,
193
- unmounted:destroyed,
194
- }
195
- </script>
196
- `
197
- }
198
- ]
162
+ line : 5
199
163
}
200
164
]
201
165
} ,
@@ -218,15 +182,7 @@ ruleTester.run('no-deprecated-destroyed-lifecycle', rule, {
218
182
}
219
183
</script>
220
184
` ,
221
- errors : [
222
- {
223
- message :
224
- 'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.' ,
225
- line : 12 ,
226
- suggestions : [
227
- {
228
- desc : 'Instead, change to `beforeUnmount`.' ,
229
- output : `
185
+ output : `
230
186
<script>
231
187
export default {
232
188
beforeCreate,
@@ -238,40 +194,21 @@ ruleTester.run('no-deprecated-destroyed-lifecycle', rule, {
238
194
activated,
239
195
deactivated,
240
196
beforeUnmount:beforeDestroy,
241
- destroyed,
197
+ unmounted: destroyed,
242
198
errorCaptured,
243
199
}
244
200
</script>
245
- `
246
- }
247
- ]
201
+ ` ,
202
+ errors : [
203
+ {
204
+ message :
205
+ 'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.' ,
206
+ line : 12
248
207
} ,
249
208
{
250
209
message :
251
210
'The `destroyed` lifecycle hook is deprecated. Use `unmounted` instead.' ,
252
- line : 13 ,
253
- suggestions : [
254
- {
255
- desc : 'Instead, change to `unmounted`.' ,
256
- output : `
257
- <script>
258
- export default {
259
- beforeCreate,
260
- created,
261
- beforeMount,
262
- mounted,
263
- beforeUpdate,
264
- updated,
265
- activated,
266
- deactivated,
267
- beforeDestroy,
268
- unmounted:destroyed,
269
- errorCaptured,
270
- }
271
- </script>
272
- `
273
- }
274
- ]
211
+ line : 13
275
212
}
276
213
]
277
214
} ,
@@ -285,42 +222,24 @@ ruleTester.run('no-deprecated-destroyed-lifecycle', rule, {
285
222
}
286
223
</script>
287
224
` ,
288
- errors : [
289
- {
290
- message :
291
- 'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.' ,
292
- line : 4 ,
293
- suggestions : [
294
- {
295
- desc : 'Instead, change to `beforeUnmount`.' ,
296
- output : `
225
+ output : `
297
226
<script>
298
227
export default {
299
228
['beforeUnmount']() {},
300
- ['destroyed ']() {},
229
+ ['unmounted ']() {},
301
230
}
302
231
</script>
303
- `
304
- }
305
- ]
232
+ ` ,
233
+ errors : [
234
+ {
235
+ message :
236
+ 'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.' ,
237
+ line : 4
306
238
} ,
307
239
{
308
240
message :
309
241
'The `destroyed` lifecycle hook is deprecated. Use `unmounted` instead.' ,
310
- line : 5 ,
311
- suggestions : [
312
- {
313
- desc : 'Instead, change to `unmounted`.' ,
314
- output : `
315
- <script>
316
- export default {
317
- ['beforeDestroy']() {},
318
- ['unmounted']() {},
319
- }
320
- </script>
321
- `
322
- }
323
- ]
242
+ line : 5
324
243
}
325
244
]
326
245
} ,
@@ -334,42 +253,24 @@ ruleTester.run('no-deprecated-destroyed-lifecycle', rule, {
334
253
}
335
254
</script>
336
255
` ,
337
- errors : [
338
- {
339
- message :
340
- 'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.' ,
341
- line : 4 ,
342
- suggestions : [
343
- {
344
- desc : 'Instead, change to `beforeUnmount`.' ,
345
- output : `
256
+ output : `
346
257
<script>
347
258
export default {
348
259
[\`beforeUnmount\`]() {},
349
- [\`destroyed \`]() {},
260
+ [\`unmounted \`]() {},
350
261
}
351
262
</script>
352
- `
353
- }
354
- ]
263
+ ` ,
264
+ errors : [
265
+ {
266
+ message :
267
+ 'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.' ,
268
+ line : 4
355
269
} ,
356
270
{
357
271
message :
358
272
'The `destroyed` lifecycle hook is deprecated. Use `unmounted` instead.' ,
359
- line : 5 ,
360
- suggestions : [
361
- {
362
- desc : 'Instead, change to `unmounted`.' ,
363
- output : `
364
- <script>
365
- export default {
366
- [\`beforeDestroy\`]() {},
367
- [\`unmounted\`]() {},
368
- }
369
- </script>
370
- `
371
- }
372
- ]
273
+ line : 5
373
274
}
374
275
]
375
276
}
0 commit comments