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

Re: Dojo and JSLint?

Expand Messages
  • Douglas Crockford
    ... Please let me know if you find out what it is. If it is failing on the dojo side, then it is likely a dojo problem that is triggered by something that
    Message 1 of 4 , Sep 15, 2008
      --- In jslint_com@yahoogroups.com, "fjcastan" <fjcastan@...> wrote:
      >
      > I've been exprimenting with mixing jslint and the dojo editor to make
      > syntax checking script editor.
      >
      > I've noticed that something in jslint seems to conflict with
      > something in dojo when when they are running together.

      > I consistently get a "node has no properties" error in dojo 1.1 when
      > JSLINT is included. I have not narrowed the error down, but I was
      > curious if anyone had any insight to the problem.

      Please let me know if you find out what it is. If it is failing on the
      dojo side, then it is likely a dojo problem that is triggered by
      something that JSLint does.

      > Doug, have you considered building a dojo widget for JSLint?

      No.
    • fjcastan
      ... make ... when ... the ... The culprit appears to be here: (line 497 of fulljslint.hs) Object.prototype.union = function (o) { var n; for (n in o) if
      Message 2 of 4 , Sep 15, 2008
        --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...>
        wrote:
        >
        > --- In jslint_com@yahoogroups.com, "fjcastan" <fjcastan@> wrote:
        > >
        > > I've been exprimenting with mixing jslint and the dojo editor to
        make
        > > syntax checking script editor.
        > >
        > > I've noticed that something in jslint seems to conflict with
        > > something in dojo when when they are running together.
        >
        > > I consistently get a "node has no properties" error in dojo 1.1
        when
        > > JSLINT is included. I have not narrowed the error down, but I was
        > > curious if anyone had any insight to the problem.
        >
        > Please let me know if you find out what it is. If it is failing on
        the
        > dojo side, then it is likely a dojo problem that is triggered by
        > something that JSLint does.

        The culprit appears to be here: (line 497 of fulljslint.hs)
        Object.prototype.union = function (o) {
        var n;
        for (n in o) if (o.hasOwnProperty(n)) {
        this[n] = o[n];
        }
        };

        and: (line 544 of dijit/_Widget.js)
        _attrToDom function in dijit._Widget attempts to copy attributes from
        a dom node and is failing because of the way its iterating through a
        list and picking up that union function. I'll look further into a fix
        from the dojo side, but it may be a more appropriate fix, to change
        it in JSLint, though I have not looked exactly how this union
        function is used.

        >
        > > Doug, have you considered building a dojo widget for JSLint?
        >
        > No.
        >

        Would you be interested in contributing JSLint to dojo? I'm currently
        working on contributing some stuff that we have on the plate possibly
        in 1.3. I can "widgetize" and test this.
      • Douglas Crockford
        ... I hope Dojo fixes it. It should be more resilient. The fix is easy. Have them contact me if they have trouble. ... You don t need permission. Everything
        Message 3 of 4 , Sep 17, 2008
          --- In jslint_com@yahoogroups.com, "fjcastan" <fjcastan@...> wrote:
          > I'll look further into a fix
          > from the dojo side, but it may be a more appropriate fix, to change
          > it in JSLint, though I have not looked exactly how this union
          > function is used.

          I hope Dojo fixes it. It should be more resilient. The fix is easy.
          Have them contact me if they have trouble.

          > Would you be interested in contributing JSLint to dojo? I'm currently
          > working on contributing some stuff that we have on the plate possibly
          > in 1.3. I can "widgetize" and test this.

          You don't need permission. Everything you need is at
          http://jslint.com/fulljslint.js

          All I ask is that you keep it up to date.
        Your message has been successfully submitted and would be delivered to recipients shortly.