jscs-dev / jscs-jsdoc

JsDoc validation rules for jscs
MIT License
99 stars 35 forks source link

Not correct warning: «Inconsistent param found», as i see #127

Closed a-x- closed 9 years ago

a-x- commented 9 years ago

Hi guys, I have a problem with jscs:

Inconsistent param found at ... :
   291 |     * @param {Number} size.width  - ширина картинки
   292 |     * @param {Number} size.height - высота картинки
-------------------------------^

As i understang, this is not correct. Right?

See here our jscs config.

Thank you!

Excuse my beginner's English.

AlexanderZeilmann commented 9 years ago

Thank you for reporting. Could you post the code (i.e. the complete comment and function) generating this error here?

a-x- commented 9 years ago

Of course! I created minimal affecting example:

var o = {
    /**
     * Вписать картинку в экран по ширине или по высоте
     * @param {Number} size.width - ширина картинки
     * @param {Number} size.height - высота картинки
     */
    setThumbSize: function(size) {
        // do some stuff
    }
};

jscs -V 1.11.3

a-x- commented 9 years ago

Oh, i'm sorry, this is mine.

Correct approach is adding @param size too.

/**
 * @param {Object} size - данные картинки
 * @param {Number} size.width - ширина картинки
 * @param {Number} size.height - высота картинки
 */
a-x- commented 9 years ago

Thank you!