I’m currently starting to learn about JavaScript on the server side with node, I’ve created a project with NPM, implemented some tests, etc.
Something that’s bugging me is the ability to force a code style on all files, I’ve been reading about JSLint and it warns you about the style errors, but I’m looking for a tool that modifies your code to obey a certain standard.
Is there any tool that covers this task?
EDIT
I’m looking for a command line tool, so I can add a task to the project using NPM and I can execute it as:
npm format
You may want to have a look at something like https://github.com/wbecker/dvcs_hook-jslint-node (and Pre Commit Hook for JSLint in Mercurial and Git) which allows you to run jslint with node, and if you are using a compatible versioning system it may do so on each commit (which is a great way to ensure every file respect your coding standard).