Skip to content

Latest commit

 

History

History
79 lines (63 loc) · 1.72 KB

File metadata and controls

79 lines (63 loc) · 1.72 KB

ember-computed-getter-codemod

Usage

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

Input / Output


basic

Input (basic.input.js):

Ember.Object.extend({
    myComputed: computed(function() {
        return "myComputed";
    })
});

Output (basic.input.js):

Ember.Object.extend({
    myComputed: computed({
        get() {
            return "myComputed";
        }
    })
});

formatted

Input (formatted.input.js):

Ember.Object.extend({
    myComputed: computed({
        get() {
            return "myComputed";
        }
    })
});

Output (formatted.input.js):

Ember.Object.extend({
    myComputed: computed({
        get() {
            return "myComputed";
        }
    })
});