Latest post 08-04-2008 8:54 by caribmedia. 2 replies.
  • 07-31-2008 16:02

    Add JSLint?

    JSLint is an excellent tool I always use before packing. Maybe you could add a web based js-lint so that people can check their code before packing.

    See jslint page

  • 08-04-2008 8:38 In reply to

    Re: Add JSLint?

    LSLint JSLing looks like an interesting tool. There is one problem though. LSLint JSLing does not suggest semi-colon after function brackets eg.:

    function eatMe()
    {
          do something
    };

    For the javascript compressor to work optimal it requires that all statements are terminated with semi-colon. See an example here: http://javascriptcompressor.com/content/CompressedExample.aspx

  • 08-04-2008 8:54 In reply to

    Re: Add JSLint?

    That's interesting - either your J key is broken, or you consistently make typos. LSLint is apparently a syntax checker for Second Life. OK, so let's assume we're both talking about jslint here.

    Following the javascript specification http://hepunx.rl.ac.uk/~adye/jsspec11/stmts.htm function definitions don't end in a semicolon. Something like

    function a() {/*code*/} function b(/*code*/) {} function c(/*code*/) {}

    Should work just fine, all on the same line. Of course, variable declarations do require a semi-colon, so e.g.

    var fa=function a() {/*code*/}; var fb = function b(/*code*/) {}; var fc = function c(/*code*/) {};

    And jslint suggests you this as well.

Page 1 of 1 (3 items) | RSS