Transform this.get('someProp')
to get(this, 'someProp')
and ensure import of
import { get } from "@ember/object";
npx lil-codemods run get path/of/files/ or/some**/*glob.js
# or
yarn global add lil-codemods
lil-codemods run get path/of/files/ or/some**/*glob.js
Input (basic.input.js):
function hello() {
this.get("whyNot");
const okay = this.get("okay");
}
Output (basic.output.js):
import { get } from "@ember/object";
function hello() {
get(this, "whyNot");
const okay = get(this, "okay");
}