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

Proposal: allow developers to use write prettier comments #641

Closed
crccheck opened this issue Sep 26, 2016 · 1 comment

Comments

@crccheck
Copy link

commented Sep 26, 2016

(ugh, return in github submits instead of doing a line break, submitted this too early)

Currently, standard does not allow code to have comments like:

// MY HEADING
/////////////

The relevant rule with a --verbose of "Expected space or tab after '//' in comment. (spaced-comment)"

I'm not sure why it's not spaced-line-comment but anyways, if you see the docs for spaced-line-comment or spaced-comment, there's a way to make an exception.

Why ///// and not //---- or something fancier? Because in VIM, you can copy paste a line, then replace all characters with / to make a fast heading. The uniformity of / also looks better IMHO.

Searching the issues shows this hasn't come up for discussion before.

@feross

This comment has been minimized.

Copy link
Member

commented Sep 26, 2016

I'm not sure why it's not spaced-line-comment

spaced-line-comment was deprecated, so we use spaced-comment now.

Why ///// and not //---- or something fancier?

If you want a comment to stand out, consider using a block comment:

/**
 * MY HEADING
 */

Inside a block comment, you can do whatever extra formatting you want, for example:

/*
 * MY HEADING
 * ==========
 */

@feross feross closed this Sep 26, 2016

@feross feross added the question label Sep 26, 2016

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

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