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

option.maxlen

Expand Messages
  • Douglas Crockford
    The maxlen option sets the maximum length (in characters) of a line of program text. Lines that are longer will produce a Line too long. warning.
    Message 1 of 2 , Oct 3, 2009
    • 0 Attachment
      The maxlen option sets the maximum length (in characters) of a line of program text. Lines that are longer will produce a "Line too long." warning.
    • Chris
      ... Hello, This has been working wonderfully, thank you for putting it in! I notice that JSLint can be put into JSON-mode if the first non-whitespace character
      Message 2 of 2 , Feb 11, 2010
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
        >
        > The maxlen option sets the maximum length (in characters) of a line of program text. Lines that are longer will produce a "Line too long." warning.
        >


        Hello,

        This has been working wonderfully, thank you for putting it in!

        I notice that JSLint can be put into JSON-mode if the first non-whitespace character is an opening brace or bracket. In JSON-mode, sloppy line breaking is permitted, regardless of whether the option is checked or not.

        Currently, lengthy JSON blocks can be flagged as "bad" due to the line length restriction. This may be a contradiction: allowing sloppy line breaking seems intended to permit the very long lines that would be generated by JSON.stringify().

        I think it would be an improvement to remove the maximum line length restriction when JSON-mode is activated, similar to the way sloppy line breaking is permitted in that case.

        Thanks!

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