Privacy Policy and Cookies

By continuing to use our site, you agree to our Privacy Policy and our use of cookies to understand how you use our site, and to improve your experience. Learn More.
I Agree.

Catching dangling commas in Aptana

Last modified date

Aptana can be configured to catch one of the most common Javascript programming errors: the dreaded “dangling comma”, an extra comma left trailing after the last property in an object literal. This problem can be fiendishly difficult to spot, particularly if you have a complex, nested arrangement of object literals.

Aptana can point you at these bugs right there in your source editor. To set this up, go to the Window menu and select Preferences, then navigate to Aptana -> Editors -> Javascript -> Validation. Your screen now looks like this:

Ensure that the “JSLint Javascript Validator” box is checked. And that’s it – dangling commas will now be reported as you type, like this:

wrussell