coding-standards icon indicating copy to clipboard operation
coding-standards copied to clipboard

Stylelint max-line-length should this apply to comments?

Open mattheu opened this issue 4 years ago • 1 comments

The stylelint rule max-line-length is set to 100. But I have run into a case where this is longer. My specific situation is the comment at the top of the theme style.css file, for example the description. We can't break this line either as WP won't then pick up the full description.

We can change this rule to ignore comments, which would solve the problem. But also could lead to long comments elsewhere which is less desirable.

What do you think? Force short theme descriptions, ignore max line length for comments, perhaps I should be ignoring this file or maybe some other way?

mattheu avatar Feb 25 '21 10:02 mattheu

Could you ignore this specific rule just for the documentation block?

/* stylelint-disable max-line-length */
/**
 * Your documentation goes here...
 */
/* stylelint-enable max-line-length */

I think that forcing short descriptions doesn't sound good, and I agree that we shouldn't allow arbitrary line lengths for all comments.

tfrommen avatar Feb 25 '21 10:02 tfrommen