[OpenLayers-Dev] jslint results

Eric Lemoine eric.c2c at gmail.com
Wed Oct 17 00:16:09 EDT 2007


On 10/16/07, Paul Spencer <pspencer at dmsolutions.ca> wrote:
> [...]
> 1) use of semi-colons
>
> Should we care about certain edge cases, such as:
>
> var f = function(){return true};
>
> will say that you need a semi-colon after true (inside the block
> scope of the function)
>
> 2) use of curly braces around block scope
>
> Should we care about one line cases and implied scope, such as:
>
> if (this.singleLayer) return;
>
> for (var i=0; i<this.grid.length; i++)
>      if (this.grid[i].length) {
>      }
>
> 3) unreachable code
>
> function foo() {
>      return true;
>      var test = 1;
> }
>
> 4) missing break statements, missing break in last case of switch
>
> 5) leading or trailing decimal points
>
> .000
>
> 000.
>
> 6) nested comments
>
> /****************
> /* comment
> /****************/

Hi Paul

Except the trailing decimal points stuff which I think isn't a big
deal at all, the mentioned checks make lots of sense to me.

Thanks a lot for taking the time to get started with jslint.

--
Eric



More information about the Dev mailing list