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

Re: /*global */

Expand Messages
  • benxwhite
    As with the others that have commented. I was very excited when this feature was introduced, and find it very useful. I often have multiple js files that are
    Message 1 of 34 , Jun 1, 2009
    • 0 Attachment
      As with the others that have commented.
      I was very excited when this feature was introduced, and find it very useful.

      I often have multiple js files that are compiled into one file during my build process.
      The /*global */ feature allows me to use jslint without the headache of writing dummy declarations in each file.

      I would hate to see this disappear.


      --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
      >
      > I will be removing the /*global */ declarative comment. I am persuaded that it is best to explicitly use var to declare all global variables, even when accessing variables created by other compilation units.
      >
      > /*global */ will just be a comment.
      >
    • Douglas Crockford
      ... Which do you think is more likely, that a program wants to change the global name, or that a var name declaration in a function was forgotten? We won t get
      Message 34 of 34 , Jun 12, 2009
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "pauanyu" <pcxunlimited@...> wrote:
        > "name" needs to be writable. It has no value by default,
        > but you can assign a string to it, indicating the name of
        > the window/tab.

        Which do you think is more likely, that a program wants to change the global name, or that a var name declaration in a function was forgotten? We won't get an implied global warning, but at least we can get a read only warning. I think that is the more useful default.
      Your message has been successfully submitted and would be delivered to recipients shortly.