Closed brettlangdon closed 8 years ago
sublime-jsfmt doesn't alter the formatted code in any way.
It looks to me like a configuration issue caused by the jquery preset here. I managed to fix the issue using this options:
"options":
{
"preset": "jquery",
"indent":
{
"value": " ",
"TopLevelFunctionBlock" : 1
}
}
@damienleroux can you add the configuration above to your sublime-jsfmt.sublime-settings and post here if it fixes the issue ?
related issue: #32
Hi,
Thank very much you for the solution. Adding "TopLevelFunctionBlock" resolved my problem.
You can close the issue.
Issue closed.
Over at rdio/jsfmt#179 we have a user which is seeing an issue which might be related to
sublime-jsfmt
.They are seeing some odd indentation issues, for example:
Gets formatted to:
They are using
node@4.2.1
and this is thepackage.json
file fromsublime-text
that they are using:I have been unable to reproduce this issue with just
jsfmt
, which leads me to believe it might be related tosublime-jsfmt
. If anyone has seen this issue before or has any insights into what might be happening, it would be greatly appreciated. (I do not use Sublime, so not sure where to begin)./cc @damienleroux