Skip to content

Add a rule to enforce maximum comment width #155

Open
@gajus

Description

@gajus

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions