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