Memory Leak codemod is suggesting some changes in mirage files
Opened this issue · 0 comments
ahemed-haneen commented
Bug or question
import { Factory } from 'miragejs';
export default Factory.extend({
name: 'new Resource',
description: null,
status: 'active',
createdTime: new Date(),
lastModifiedTime: new Date(),
relatedItems: [
'a', 'b', 'c', 'd'
],
});
is getting updated when running
pnpm dlx ember-memory-leaks-codemod prototype-reference-leaks mirage/
to
import { Factory } from 'miragejs';
export default Factory.extend({
name: 'new Resource',
description: null,
status: 'active',
createdTime: new Date(),
lastModifiedTime: new Date(),
init() {
this._super(...arguments);
this.relatedItems = [
'a', 'b', 'c', 'd'
];
},
});
is this a valid case or is the codemod raising a false alarm?