These are a bunch of codemods I've developed to speed of my dev process. I'm just stashing this on GitHub for myself and not making too much effort to offer documentation.
Unless otherwise specified, the codemods are not structured to be passed to
jscodeshift
as the -t
argument -- rather, I am calling them from
atom-morpher
scripts to transform
code in the editor.
convertLambdaToReturn
- convert the expression body of arrow function(s)convertFSCToComponent
- convert function stateless component(s) toReact.Component
class(es)These transforms add the necessary imports, code and flow types for a new
association to module exporting a Sequelize.Model
. These transforms are
specific to how I structure my model folder and classes, and may or may not
fit your use case.
addBelongsToAssociation
addHasOneAssociation
addHasManyAssociation
addBelongsToManyAssociation