jscs-dev / jscs-jsdoc

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

add option to enforceExistence only on module.exports ? #87

Closed TripledT closed 9 years ago

TripledT commented 9 years ago

The enforceExistence option supports all and exceptExports. I was wondering what the reason was for excluding exports from the check ? It seems that since exports is what is being shared, that they should be documented.

qfox commented 9 years ago

In some cases no need to have jsdoc for files like:

module.exports = function () {
  return {
    data: 'data',
    more: 'foobar',
    plurals: (n) => n%10 === 1 && (n%100 < 10 || n%100 > 20);
  };
};

And files like that don't need documentation for .exports.

Anyway, if you feel that you need to describe each function in your code — use true ;-).

qfox commented 9 years ago

I'm closing this for now, feel free to discuss if you think that it should be reworked.