MithrilJS / mithril-codemods

jscodeshift-powered mithril@0.2.x to mithril@1.x transformations
MIT License
19 stars 4 forks source link

m.redraw.strategy should be wrapped/warn when not removed #22

Closed tivac closed 7 years ago

tivac commented 7 years ago

Original Source

function() {
    m.redraw.strategy("diff");
}

Tool Output

function() {
    m.redraw.strategy("diff");
}

Expected Output

function() {
    if(m.redraw.stategy) {
        m.redraw.strategy("diff");
    }
}

or

function() {
    console.warn("m.redraw.strategy is DEPRECATED") || m.redraw.strategy("diff");
}