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

RE:09-16-2010 version has bug

Expand Messages
  • douglas@crockford.com
    If JSLint sees use strict ; then it turns on option.newcap for you.
    Message 1 of 9 , Sep 17, 2010
    • 0 Attachment
      If JSLint sees "use strict"; then it turns on option.newcap for you.
    • abyssoft@ymail.com
      Thats not a good idea Douglas, I would still like very much to be able to have that one option off as I have to use a 3rd party API that is not strict. and
      Message 2 of 9 , Sep 17, 2010
      • 0 Attachment
        Thats not a good idea Douglas, I would still like very much to be able to have that one option off as I have to use a 3rd party API that is not strict. and that is the primary area of contetion and I don't want my screen mucked up by in this case erroneous errors.
      • douglas@crockford.com
        You should never label non-strict code as strict. There is a contract that comes with use strict ;.JSLint helps you to honor that contract.
        Message 3 of 9 , Sep 17, 2010
        • 0 Attachment
          You should never label non-strict code as strict. There is a contract that comes with "use strict";.JSLint helps you to honor that contract.
        • abyssoft@ymail.com
          ... Ok given that constraint what is the best set of options that will get me as close to strict as possible and still permit me to use class constructor names
          Message 4 of 9 , Sep 17, 2010
          • 0 Attachment
            --- In jslint_com@yahoogroups.com, douglas@... wrote:
            >
            > You should never label non-strict code as strict. There is a contract that comes with "use strict";.JSLint helps you to honor that contract.
            >


            Ok given that constraint what is the best set of options that will get me as close to strict as possible and still permit me to use class constructor names that start with lowercase? I'm wanting to maintain as close to strict as I can, however I have no control over whether we use the 3rd party API at my work. It is required use for the project I'm on.

            I am most grateful for any assistance, thank you in advance.
          • Frederik Dohr
            ... You might be able to create a local alias for the API s constructors: (function() { var Foo = lib.foo; var instance = new Foo(); })(); -- F.
            Message 5 of 9 , Sep 18, 2010
            • 0 Attachment
              > use class constructor names that start with lowercase? I'm wanting
              > to maintain as close to strict as I can, however I have no control
              > over whether we use the 3rd party API

              You might be able to create a local alias for the API's constructors:

              (function() {

              var Foo = lib.foo;

              var instance = new Foo();

              })();


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