Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New ESLint core rule: multiline-comment-style #1003

Open
mightyiam opened this issue Oct 15, 2017 · 5 comments

Comments

@mightyiam
Copy link
Contributor

commented Oct 15, 2017

https://eslint.org/docs/rules/multiline-comment-style

Let's set a standard for multiline comments.

The default starred-block seems like the way to go.

@mightyiam

This comment has been minimized.

Copy link
Contributor Author

commented Oct 15, 2017

@uloco

This comment has been minimized.

Copy link

commented Oct 21, 2017

I think block comments should be only used as doc comments. In this way they can clearly be distinguished and syntax highlighted appropriately. Imoo we shouldn't enforce this rule...

@stale

This comment has been minimized.

Copy link

commented May 10, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label May 10, 2018

@stale stale bot closed this May 17, 2018

@feross feross reopened this May 20, 2018

@stale stale bot removed the stale label May 20, 2018

@feross feross added the enhancement label May 20, 2018

@voxpelli

This comment has been minimized.

Copy link

commented Jul 13, 2018

@uloco Isn't there a difference between a doc comment and an ordinary comment in that one start with /** and the other with just plain /*?

https://eslint.org/docs/rules/multiline-comment-style only mentions the need to start with /* while eg. http://usejsdoc.org/about-getting-started.html outlines that /** is required for a documentation comment.

I'm +1 on this and @mightyiam can probably update his PR now that ESLint 4 (and almost ESLint 5: standard/eslint-config-standard#123) is supported by eslint-config-standard

@uloco

This comment has been minimized.

Copy link

commented Jul 13, 2018

@voxpelli Yes you are right, there is a difference. It's just personal taste. I don't use block comments at all, because they look too familiar to doc comments and make problems when nesting (and toggling them). I use line comments for commenting code and doc comments for docs. It's just an opinion. If you really like to enforce this style, go for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.