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

Add a rule to enforce maximum comment width #155

Open
gajus opened this issue Sep 19, 2015 · 0 comments
Open

Add a rule to enforce maximum comment width #155

gajus opened this issue Sep 19, 2015 · 0 comments

Comments

@gajus
Copy link

gajus commented Sep 19, 2015

Add a rule that allows to set a variable maximum width of comment.

This rule is designed to prevent silly long comments, e.g.

/**
 * aaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbccc
 */

That (depending on the text editor) require that user scrolls the window horizontally to read the entire comment.

Have a sane default, e.g. 70 to encourage consistent width across projects that use JSCS.

Do not forget to consider fullwidth characters. I suggest to use string-width.

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

No branches or pull requests

2 participants