Last active
January 29, 2016 15:58
-
-
Save torifat/83da48336867e128f2ca to your computer and use it in GitHub Desktop.
$ jscodeshift -t ../codemod/static-property-semicolon.js src/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function(file, api) { | |
const j = api.jscodeshift; | |
const { expression, statement, statements } = j.template; | |
return j(file.source) | |
.find(j.ClassProperty) | |
.replaceWith(p => { | |
p.node.end++; | |
return p.node; | |
}) | |
.toSource(); | |
}; |
Just leaving this here as a reference: jscodeshift -t ../codemod/static-property-semicolon.js src/
how exactly does p.node.end++
insert a semicolon?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@0x80 yeah, it was from the boilerplate. Thanks for mentioning.