npx ember-computed-getter-codemod ember-computed-getter-codemod path/of/files/ or/some**/*glob.js
# or
yarn global add ember-computed-getter-codemod
ember-computed-getter-codemod ember-computed-getter-codemod path/of/files/ or/some**/*glob.js
- basic
- computed-args-formatted
- computed-args
- empty-body
- formatted
- if-statement-no-args
- setter-no-args
- setter
Input (basic.input.js):
Ember.Object.extend({
myComputed: computed(function() {
return "myComputed";
})
});
Output (basic.input.js):
Ember.Object.extend({
myComputed: computed({
get() {
return "myComputed";
}
})
});
Input (formatted.input.js):
Ember.Object.extend({
myComputed: computed({
get() {
return "myComputed";
}
})
});
Output (formatted.input.js):
Ember.Object.extend({
myComputed: computed({
get() {
return "myComputed";
}
})
});