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

Configurable indent level

Expand Messages
  • Jakob Kruse
    Hi I would like to request for the indent level used/checked by jslint, when the whitespace option is turned on, to be made configurable, as an option. Reason:
    Message 1 of 2 , May 22 3:55 AM
    • 0 Attachment
      Hi

      I would like to request for the indent level used/checked by jslint,
      when the whitespace option is turned on, to be made configurable, as
      an option.

      Reason: The whitespace checking is generally a very nice thing,
      promoting uniformity and thus readability of code, but code standards
      differ from place to place or group to group. I have to indent my code
      using two spaces to follow local code standards, and this means I have
      to turn the whitespace option off.

      As a workaround I have made a copy of the jslint script that uses an
      indent level of 2 (not very difficult, change the number "4" to
      whatever you like on every line that includes the word "indent"), but
      obviously this is not an optimal solution.

      Thanks,
      Jakob
    • mflanagan_swim
      I agree! I also modified the existing jslint, but I added an edit box so I could specify the value (so no hard-coding). But Douglas does such a good job of
      Message 2 of 2 , May 22 7:01 AM
      • 0 Attachment
        I agree! I also modified the existing jslint, but I added an edit box
        so I could specify the value (so no hard-coding). But Douglas does
        such a good job of enhancing/fixing jslint, my mods are out of date
        very soon, and I don't want to re-apply them each time.

        Michael

        --- In jslint_com@yahoogroups.com, "Jakob Kruse" <kruse@...> wrote:
        >
        > Hi
        >
        > I would like to request for the indent level used/checked by jslint,
        > when the whitespace option is turned on, to be made configurable, as
        > an option.
        >
        > Reason: The whitespace checking is generally a very nice thing,
        > promoting uniformity and thus readability of code, but code standards
        > differ from place to place or group to group. I have to indent my code
        > using two spaces to follow local code standards, and this means I have
        > to turn the whitespace option off.
        >
        > As a workaround I have made a copy of the jslint script that uses an
        > indent level of 2 (not very difficult, change the number "4" to
        > whatever you like on every line that includes the word "indent"), but
        > obviously this is not an optimal solution.
        >
        > Thanks,
        > Jakob
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.