The AirB&B Javascript Style Guide recommends functions include a multi-line comment above them with a description, types, and values for all parameters and return values.
Doing so would be a big help when you stumble something like the extended React version of the Meteor Todos tutorial or really any other tutorial. I’d think it would be great in any app or package where you might want collaborators. But I’ve not seen it in practice. Is anyone in the meteor community documenting their code this thoroughly? Should we be?
We use JSDoc for meteor core! But editor support isn’t always great and typing them out manually isn’t ideal. Sublime text has a great plugin for this.
For info, if you type /** and press enter in webstorm it will automatically add a JSDoc style comment and with the @param values automatically listed out.
Yes - kind of. I don’t use automatic wrap, but if I’m typing a comment and hit enter, it automatically indents and inserts the * lined up with the previous line’s. Very nice.