You could probably use astyle for formatting, since JavaScript is a
C-like language.

-Ken


On Thu, May 3, 2012 at 8:45 AM, Mark Volkmann <[email protected]> wrote:
> One way to end the debates about JS style preferences, or at least
> reduce them, would be to write a really good JS code formatter. It
> could use a config file to specify preferences like:
>
> - use ASI or don't
> - comma-first or comma-last
> - maximum line length or no limit
> - indentation (2, 3, 4 spaces or tabs)
> - force braces on if statements and loops or don't
> - allow single-line if statements and loops or don't
> - remove trailing whitespace
> - function comment style
> - and more
>
> Maybe this could be used in conjunction with Git hooks to
> automatically format code in your preferred style on checkout or pull
> and automatically format code in the preferred style of the repo.
> owner on push or pull request.
>
> --
> R. Mark Volkmann
> Object Computing, Inc.
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to