webmechanicx / css3-mediaqueries-js

CSS3 Media Queries - JS
3 stars 0 forks source link

JSHint or JSLint the code please #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I placed the code into JSHint and came across a few issues but the worse two 
are variables being initialised out of scope (within blocks) and one case of a 
line breaking off 3 different if conditions BEFORE && instead of after. The 
latter issue is worrying only because we can't predict the interpreter in that 
case, where it might insert a ; instead of a \n.

I have attached a patch of my changes. The code now validates with JSHint 
(www.jshint.com) with these options checked ONLY:
- Require curly braces around all blocks
- Stop on the first error
- Require variables to be declared before usage
- Browser

Original issue reported on code.google.com by audvare on 21 May 2011 at 5:21

Attachments:

GoogleCodeExporter commented 8 years ago
Back from the dead... There is a new version of the script. It has some CSS 
parsing and processing improvements. If you're still using it, or would like to 
try again, could you confirm that this issue is solved or not?

Original comment by wou...@dynora.nl on 4 Apr 2014 at 11:46