Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filedrop.js FileDrop master download has js lint errors+ #46

Open
truedat101 opened this issue Apr 21, 2015 · 0 comments
Open

filedrop.js FileDrop master download has js lint errors+ #46

truedat101 opened this issue Apr 21, 2015 · 0 comments

Comments

@truedat101
Copy link

The unminified version of filedrop.js has lint errors, found using jshint, from version downloaded here: http://github.com/ProgerXP/FileDrop/archive/master.zip

Loaded in the browser, there are "missing semicolon" errors. Workaround, use filedrop-min.js.

   public/js/filedrop.js
     12 |    define(['exports'], function (exports) { init(root, exports) })
                                                                         ^ Missing semicolon.
     12 |    define(['exports'], function (exports) { init(root, exports) })
                                                                            ^ Missing semicolon.
     14 |    init(root, exports)
                                ^ Missing semicolon.
     16 |    init(root, root.fd = root.fd || {})
                                                ^ Missing semicolon.
     29 |    return (prefix || 'fd') + '_' + (Math.random() * 10000).toFixed()
                                                                              ^ Missing semicolon.
     30 |  }
            ^ Missing semicolon.
     38 |    do { var id = global.randomID(prefix) } while (global.byID(id))
                                                  ^ Missing semicolon.
     38 |    do { var id = global.randomID(prefix) } while (global.byID(id))
                                                                        ^ 'id' used out of scope.
     38 |    do { var id = global.randomID(prefix) } while (global.byID(id))
                                                                            ^ Missing semicolon.
     39 |    return id
                    ^ 'id' used out of scope.
     39 |    return id
                      ^ Missing semicolon.
     40 |  }
            ^ Missing semicolon.
     53 |    return global.isTag(id) ? id : document.getElementById(id)
                                                                       ^ Missing semicolon.
     54 |  }
            ^ Missing semicolon.
     81 |           ( !tag || element.tagName.toUpperCase() == tag.toUpperCase() )
                                                                                  ^ Missing semicolon.
     82 |  }
            ^ Missing semicolon.
     90 |      return new XMLHttpRequest
                          ^ Missing '()' invoking a constructor.
     90 |      return new XMLHttpRequest
                                        ^ Missing semicolon.
     95 |                     'MSXML2.XMLHTTP', 'Microsoft.XMLHTTP']
                                                                    ^ Missing semicolon.
     99 |          return new ActiveXObject(activex[i])
                                                       ^ Missing semicolon.
    100 |        } catch (e) {}
                           ^ Value of 'e' may be overwritten in IE 8 and earlier.
    104 |    throw 'Cannot create XMLHttpRequest.'
                                                  ^ Missing semicolon.
    105 |  }
            ^ Missing semicolon.
    120 |    return Object.prototype.toString.call(value) === '[object Array]'
                                                                              ^ Missing semicolon.
    121 |  }
            ^ Missing semicolon.
    155 |      return []
                        ^ Missing semicolon.
    158 |      value = [value]
                              ^ Missing semicolon.
    161 |    return Array.prototype.slice.call(value, skipFirst || 0)
                                                                     ^ Missing semicolon.
    162 |  }
            ^ Missing semicolon.
    181 |        element['e' + type + callback] = callback
                                                          ^ Missing semicolon.
    183 |          element['e' + type + callback](window.event)
                                                               ^ Missing semicolon.
    184 |        }
                  ^ Missing semicolon.
    185 |        element.attachEvent('on' + type, element[type + callback])
                                                                           ^ Missing semicolon.
    187 |        element.addEventListener(type, callback, false)
                                                                ^ Missing semicolon.
    191 |    return element
                           ^ Missing semicolon.
    192 |  }
            ^ Missing semicolon.
    199 |    event.cancelBubble = true
                                      ^ Missing semicolon.
    200 |    event.returnValue = false
                                      ^ Missing semicolon.
    201 |    event.stopPropagation && event.stopPropagation()
                                                            ^ Expected an assignment or function call and instead saw an expression.
    201 |    event.stopPropagation && event.stopPropagation()
                                                             ^ Missing semicolon.
    202 |    event.preventDefault && event.preventDefault()
                                                          ^ Expected an assignment or function call and instead saw an expression.
    202 |    event.preventDefault && event.preventDefault()
                                                           ^ Missing semicolon.
    203 |    return event
                         ^ Missing semicolon.
    204 |  }
            ^ Missing semicolon.
    219 |    if ((element = global.byID(element)) && className != null) {
                                                               ^ Use '!==' to compare with 'null'.
    221 |        element.className = element.className.replace(global.classRegExp(className), ' ')
                                                                                                  ^ Missing semicolon.
    223 |        element.className += ' ' + className
                                                     ^ Missing semicolon.
    227 |    return element
                           ^ Missing semicolon.
    228 |  }
            ^ Missing semicolon.
    246 |    return global.classRegExp(className).test( (global.byID(element) || {}).className )
                                                                                                ^ Missing semicolon.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant