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

881Re: Save and restore jslint settings

Expand Messages
  • pauanyu
    Sep 2, 2009
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "woomla" <woomla@...> wrote:
      >
      > Every know and then I want to change a /*jslint*/ setting for a particular statement. After the statement I want to restore the setting to its previous state. It would be nice if I can restore the setting without knowing its previous state/value (i.e. indent).
      >
      > A solution would be something to push the options and afterwards pop the options:
      >
      > "use strict";
      > var prop, foo;
      >
      > /*pushoptions*/
      > /*jslint forin:true*/
      > for (prop in foo) {
      > foo[prop] = "foo";
      > }
      > /*jslint forin:false*/
      > /*popoptions*/
      >
      >
      > I've implemented this in my pspad plugin and it works great. I would love to see it in the official script though.
      >

      I had the same idea, but with different syntax:

      "use strict";
      var prop, foo;

      /*options forin: true */
      for (prop in foo) {
      foo[prop] = "foo";
      }
      /*end options */
    • Show all 13 messages in this topic