SirDre / gmaps-utility-library-dev

Exported from code.google.com/p/gmaps-utility-library-dev
0 stars 2 forks source link

JSLint produces lots of errors #42

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The libraries could use a little cleaning.

Original issue reported on code.google.com by lem...@gmail.com on 17 Jun 2008 at 3:59

GoogleCodeExporter commented 8 years ago
Branch added in r642.

Original comment by lem...@gmail.com on 17 Jun 2008 at 5:30

GoogleCodeExporter commented 8 years ago
There are rules in JSLint that may actually hurt the packer, such as missed
semicolons  . The result is the packed version not working. e.g.
http://gmaps-utility-library-dev.googlecode.com/svn/trunk/extinfowindow/examples
/ajaxContent_packed.html

However, some rules maybe relaxed without impact the packer. One of them is
whitespace. If we change the 'white' to false, the amount of error can be 
reduced
significantly. (Most IDE can config indentation but not white space to the way 
JSLint
wants).

If no objection, I'd change the white to false in jslint.conf. 

Original comment by nian...@gmail.com on 6 Nov 2008 at 7:06

GoogleCodeExporter commented 8 years ago
JSLint, Packer, and our coding conventions all require semicolons at the end of
function calls and variable assignments.  Rather than hurt the packer, 
semicolons
ensure that it works correctly.  See, e.g.,
http://gmaps-utility-library-dev.googlecode.com/svn/branches/lemnar-style-branch
/extinfowindow/examples/ajaxContent_packed.html

Run the JSLint on the lemnar-style-branch.  I eliminated almost all errors, 
including
whitespace, iirc.  The branch just needs to revert the quotation mark 
preferences
(r681) and then it should be ready to be merged back into the trunk.  Keeping 
the
whitespace option means that folks can use either the version of JSLint in our 
repo,
or jslint.org with the default settings and get the same results.

Original comment by lem...@gmail.com on 7 Nov 2008 at 5:50