You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/11/10 15:28:34 UTC

[jira] [Commented] (COUCHDB-561) JSLint errors in jquery.couch.js

    [ https://issues.apache.org/jira/browse/COUCHDB-561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14204824#comment-14204824 ] 

ASF GitHub Bot commented on COUCHDB-561:
----------------------------------------

GitHub user kxepal opened a pull request:

    https://github.com/apache/couchdb-jquery-couch/pull/4

    Tolerate JSlint

    COUCHDB-561
    
    The only errors left are:
    ```
    ./node_modules/jslint/bin/jslint.js --maxerr=100 jquery.couch.js                                                                                                *[master] [17:22:19] ▸▸▸▸▸▸▸▸▸▸
    
    jquery.couch.js
     #1 Unexpected TODO comment.
        // todo: can we use commonjs require here? // Line 312, Pos 13
     #2 Unexpected 'typeof'. Use '===' to compare directly with undefined.
        if (typeof Base64 === "undefined") { // Line 313, Pos 15
     #3 Expected exactly one space between 'return' and '{'.
        return /** @lends $.couch.db */ { // Line 326, Pos 39
     #4 Unnecessary 'else' after disruption.
        } else { // Line 618, Pos 13
     #5 Unused '_'.
        function (_, doc) { // Line 781, Pos 23
     #6 Unused 'ajax'.
        function ajax(obj, options, errorMessage, ajaxOptions) { // Line 1081, Pos 12
     #7 Unused 'fullCommit'.
        function fullCommit(options) { // Line 1154, Pos 12
     #8 Unused 'encodeOptions'.
        function encodeOptions(options) { // Line 1171, Pos 12
     #9 Unused 'toJSON'.
        function toJSON(obj) { // Line 1194, Pos 12
    #10 Unused 'maybeUseCache'.
        function maybeUseCache() { // Line 1201, Pos 12
    ```
    
    Unused are happens because of globals workaround; TODO remains TODO; typeof have to compare with undefined since Base64 is a browser's global thing; else is better to keep for readability.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kxepal/couchdb-jquery-couch 561-jslint

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-jquery-couch/pull/4.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4
    
----
commit 883de0a3e5cab6bd49454fa621690b48c9adda25
Author: Alexander Shorin <kx...@apache.org>
Date:   2014-11-10T14:23:42Z

    Tolerate JSlint
    
    COUCHDB-561

----


> JSLint errors in jquery.couch.js
> --------------------------------
>
>                 Key: COUCHDB-561
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-561
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: foobar
>         Attachments: jslintErrors.patch
>
>
> This patch fixes the jslint errors in jquery.couch.js



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)