Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

jsdoc-format enhancement #1052

Closed
trodi opened this issue Mar 22, 2016 · 2 comments · Fixed by #3181
Closed

jsdoc-format enhancement #1052

trodi opened this issue Mar 22, 2016 · 2 comments · Fixed by #3181
Milestone

Comments

@trodi
Copy link

trodi commented Mar 22, 2016

This isn't exactly a bug, so I'll mark as an enhancement. All the JSDoc documentation shows two ways to write out comments:

  1. One line:
    /** Some comment here */
  2. Multi-line:
/**
 * Some comment
 * more comments
 */

TSLint currently (v3.6.0) allows both of the following:

  1. Expected multi-line
/**
 * Some comment
 * More info
 */
  1. Unexpected multi-line
/** Some comment
 * More info
 */

I don't think this breaks JSDoc, but it isn't expected and from a styling point of view, mixing them isn't ideal. Can the rule enforce the expected styling?

@ajafff
Copy link
Contributor

ajafff commented Aug 16, 2017

I'd like to see this implemented. Do we need an option to enable it?

@trodi
Copy link
Author

trodi commented Aug 16, 2017

@ajafff I would think this would be the default behavior if jsdoc-format was turned on. However, it might make sense to accept configuration of the rule. I see 2 options:

  1. enforce my "expected multi-line"
  2. enforce my "unexpected multi-line"

Therefore you don't get a mixture in your project, but you are flexible to someone's style considering it doesn't break the typical js-doc tool.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants