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

Re: [jslint] Option to tolerate == vs ===

Expand Messages
  • Michael Mikowski
    Hi Tim: You should be able to set the eqeqeq flag to false, and this should take care of most warnings. /*jslint eqeqeq: false, ... */ When you have time, you
    Message 1 of 2 , May 23, 2011
      Hi Tim:

      You should be able to set the eqeqeq flag to false, and this should take care of most warnings.

      /*jslint eqeqeq: false, ... */

      When you have time, you could turn that back on and fix type miss-matches.


      IIRC, jslint may still complain if you are comparing to falsey values, e.g:

      if ( x == 0 ){ ...

      If that is a real problem, you might look at the jslint source and disable that warning.

      Cheers, Mike



      ________________________________
      From: timryandls <tryan@...>
      To: jslint_com@yahoogroups.com
      Sent: Monday, May 23, 2011 9:06 AM
      Subject: [jslint] Option to tolerate == vs ===


       
      I'm currently refactoring a massive legacy site with several hundred thousand lines of js code, spread thru 100s of js files as well as inlined in jsp files.

      I'm getting 100s of errors for == vs === problems as I work, making it difficult to pick out more severe breaking errors as I clean things. While I can change some of these on the fly for those at are immediately obvious, some cannot be readily changed due a lot of really bad coding, making it unsafe to assume the type of the var and whether it's safe to switch to ===.

      What do think about adding a 'tolerate' option to skip these?




      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.