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

943Maximum line lengths

Expand Messages
  • Chris
    Oct 1, 2009
    • 0 Attachment
      Code can become difficult to read if it goes on for too long without a line break. This most obviously becomes a problem as soon as it becomes necessary to scroll horizontally, but I find that readability actually becomes affected well before that.

      I find that code is cleaner and more understandable if care is taken that no lines exceed 80 - 100 characters in length.

      I suggest that JSLint include an option that would produce a warning message when a line exceeds a certain length (including comments). The specific length in question would probably need to be a user preference, similar to how the indentation setting works. I am sure many people have differing opinions on how long is "too long." I personally prefer 80 characters.
    • Show all 9 messages in this topic