Sunday 11 February 2018

NPM style code formater

So I have this codebase that is written in the coding-style of npm. It has been decided that this is the coding-style that will be used. There is nothing I can change about that. I'm not saying that it's a good or a bad style. It's just a fact that this coding-style will be used. If you don't know the coding-style of npm they format things like this:var magicWords = [ 'abracadabra' , 'gesundheit' , 'ventrilo' ] , spells = { 'fireball' : function () { setOnFire() } , 'water' : function () { putOut() } } , a = 1 , b = 'abc' , etc , somethingElse Is there a code formater that can format code like this? js-beautify supports comma_first but there is no support for the "funny" (as npm call it themselves) indentation style.(I don't want this to turn into a discussion about code-style, please. )

Submitted February 11, 2018 at 03:14PM by ThereIsNoDana-6

No comments:

Post a Comment