Use valid JSDoc comments or remove the invalid ones.
tmilar opened this issue · 0 comments
tmilar commented
There are a lot of invalid JSDoc comment blocks that need to be fixed, or else removed.
Running xo
will complain about this with warnings.
Expected: xo
doesn't complain about this.
Example of wrong case:
/**
* Callback after Mercadolibre authorization.
* Uses default meliAuth.onAuth() callback, but it can be overwritten for custom logic ie. CLI app.
*
* @param accessToken
* @param refreshToken
* @param profile
* @param done
* @returns {Promise<*>}
*/
const authorizedCb = async (accessToken, refreshToken, profile, done) => {
// ...
}
Example of correct case:
/**
*
* @param {Object} loggedUser - the mercadolibre logged user info
* @param {Object} loggedUser.profile - mercadolibre account profile info
* @param {Object} loggedUser.tokens.<accessToken, refreshToken>
* - mercadolibre account tokens
*
* @returns {Promise<void>} - exec promise
*/
async function registerAccount({profile, tokens}) {
// ...
}
Originally commented by @fmiras in https://github.com/tmilar/meli-manager/pull/40/files#r224301316