A better way to write AMD Declerations

It seems that the current trend is to trash AMD javascript function declarations. If styled properly, AMD really doesn't suck, nor does it waste valuable vertical real-estate.

The Wrong Way, Newline Hell

Some people just don't appreciate vertical real-estate and will put a newline for each dependency. Have fun reading it.

define([  
 'someView1',
 'someView2',
 'someView3',
 'someModel',
 'someCollection'
],
function(  
    SomeView1,
    SomeView2,
    SomeView3,
    SomeModel,
    SomeCollection
) {
    //CODE HERE
});

Okay, but confusing Way

Then you have others which will add a newline every 5ish dependencies. This is a bit better, but requires much more than a quick glance to understand the dependencies.

define(['someView1', 'someView2', 'someView3',  
        'someModel', 'someCollection'],
function(SomeView1, SomeView2, SomeView3,  
         SomeModel, SomeCollection) {
         // Code here
}

The Right Way

Simply use two lines. Line 1 is where you define where the dependencies map to. Line 2 is what variable the dependencies are stored in:

define(['someView1', 'someView2', 'someView3', 'someModel', 'someCollection1', 'someCollection2', 'someCollection3', 'someCollection4'],  
function(SomeView1,   SomeView2,   SomeView3,   SomeModel,   SomeCollection1,   SomeCollection2,   SomeCollection3,   SomeCollection4) {  
         // Code here
}

This coding style allows for me to quickly match where my dependencies are coming from. For Sublime users, the define and function lines will not wrap, allowing me to quickly scroll left/right to view my dependencies (or cmd+f). Adding and viewing dependencies is as a cinch. As for VI(M)/Emacs users, you end up with the 2nd example. Which is still better than new-lining each dependency.

So long as we use the right way, AMD isn't really that sucky.