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

2205possible erroneous warning due to multi-line layout

Expand Messages
  • Zhami
    May 12, 2011
    • 0 Attachment
      I am receiving a warning about mis-positioning of text.
      My practice is to declare my vars on multiple lines, where I distinguish
      vars that hold variables from vars that hold functions, as is done in
      the code snippet below (I have hollowed this out from actual code).
      I use tabs for indenting, but substitute with leading periods so that
      they are preserved ... please convert back to examine this in JSLint, or
      pull from my gist: https://gist.github.com/969076
      (function () {."use strict";
      .var processTheForm;
      .processTheForm = function () {
      ..var resultObjHash,...// functions...createElemHandler,
      createResultObj;
      ..createElemHandler = function () {..}; ..createResultObj = function ()
      {..}; ..resultObjHash = {}; .};}());
      JSLint reportsProblem at line 11 character 32: Expected
      'createResultObj' at column 13, not column 32.
      This warning will go away if a second non-function var is declared on
      the first line of the var statement, as in:
      ..var resultObjHash, another,
      I believe that the warning reported when only one var is declared on the
      first line is innapropriate.







      [Non-text portions of this message have been removed]
    • Show all 7 messages in this topic