Loading ...
Sorry, an error occurred while loading the content.

JSLint with Rhino - failing for a statement which passes in web version

Expand Messages
  • Kunal Kumar
    Hello, I am trying to integrate JSLint with our build and hence my preferred choice is Rhino engine for JSLint. However I havn t had much of luck in getting
    Message 1 of 1 , Oct 29, 2009
    • 0 Attachment
      Hello,

      I am trying to integrate JSLint with our build and hence my preferred choice is Rhino engine for JSLint. However I havn't had much of luck in getting success result with rhino/jslint yet!

      So, here's my problem. Our javascript code are based on ExtJS framework and hence most of the code file start with Ext.namespace statement. For example, One of our file has

      Ext.namespace( "TEST" );

      When I copy this statment and run in "http://www.jslint.com/" with options as "/*jslint onevar: true, browser: true, rhino: true, debug: true, evil: true, sub: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, immed: true */" and predefined object "Ext", it passess successfully. I do not get any errors.

      However when I pass the same file to jslint using Rhino (as specified in http://www.jslint.com/rhino/index.html ), it throws me the error

      Lint at line 1 character 1: Cannot read property "id" from undefined

      The options in jslint.js are same as what I define in web version.

      I do not understand why the output differs in web based and rhino based version? Can anyone suggest something? Am I missing anything here?

      -Kunal
    Your message has been successfully submitted and would be delivered to recipients shortly.