Skip to content

Conversation

scottinet
Copy link
Contributor

  • .eslintrc is now deprecated, using .eslintrc.json instead
  • Removed chaining capabilities from functions with required callbacks
  • Added chaining capabilities to functions with optional callbacks
  • Simplified some callback handling, shaving some space from the minified library

@codecov-io
Copy link

codecov-io commented Sep 6, 2016

Current coverage is 100% (diff: 100%)

Merging #108 into develop will not change coverage

@@           develop   #108   diff @@
=====================================
  Files           15     15          
  Lines         1631   1522   -109   
  Methods        278    258    -20   
  Messages         0      0          
  Branches       397    393     -4   
=====================================
- Hits          1631   1522   -109   
  Misses           0      0          
  Partials         0      0          

Powered by Codecov. Last update aaef827...25eeab5

};

/**
* Gets the rights array of the currently logged user.
*
* @param {object} [options] - Optional parameters
Copy link

@ballinette ballinette Sep 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the options parameter should be removed from the function definition?

Kuzzle.prototype.getMyRights = function (options, cb) {
// (...)
   if (!cb && typeof options === 'function') {
     cb = options;
     options = null;
   }
// (...)
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, this seems to be an old mistake. Fixing it right away.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ballinette
Copy link

Need to clean-up the jsdoc:
remove @returns {object} this when the method no longer returns the chaining object.
Add it when the chaining has been added.

Despite of that, 👍 for me ;)

@scottinet
Copy link
Contributor Author

Dang, you're right about jsdoc :-(

It has been updated.

@scottinet scottinet merged commit 3fd4c2b into develop Sep 15, 2016
@scottinet scottinet deleted the kuz-410-normalize-chaining branch September 15, 2016 14:13
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

Successfully merging this pull request may close these issues.

3 participants