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

some ideas for options

Expand Messages
  • peter bosanko
    Hi Sorry if these ideas have been proposed before. If they have been proposed, then they have not been implemented so I would like to propose them again I
    Message 1 of 1 , Jan 4, 2011
    • 0 Attachment
      Hi

      Sorry if these ideas have been proposed before.
      If they have been proposed, then they have not been implemented so I would
      like to propose them again

      I don't like to implement any third-party javascript (ie any code not
      written by me) without gauging its quality with jslint.
      In so doing I come across some constructions which may be questionable in
      terms of style, but are unquestionably legal javascript.
      Because at the moment jslint reports these constructions as errors I
      subsequently run into the "too many errors" limitation.

      Three of these constuctions are:
      1)
      condition && func()
      which only calls func if condition is true, perhaps a more normal
      construction would be:
      if (condition)
      func()

      2) x = new constructorfunc
      calling a constructor function which does not have parameters does not
      require parens after the name of the constructor functions
      This is another of those cases when the advantages of saving two characters
      might be weighed against the possible confusion and decreased clarity, but
      nevertheless this construction is very widely used and is legal so it would
      be nice to have a tolerate option

      3)
      if (condition)
      action
      I understand the reasons behind reporting non curly bracketed actions as an
      error, but they are legal and they are used, so it would be nice to have an
      option to tolerate them so that code not written by ourselves can be
      analysed

      Thanks


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