Topic on Manual talk:Coding conventions/CSS

Clarification needed about documenting class names

3
Rand(1,2022) (talkcontribs)

A Gerrit test build reported an error and sent me over to the section about constructed class names, which suggests that for each css class you add a single-line comment followed by an asterisk and the claas name. Whch is precisely what I did yet here I am.

Is it possible that we shouldn't use single-line comments as suggested there? Or maybe that they should be multi-line comments, or only if that's what you're using already?

Krinkle (talkcontribs)

It looks like the change you're referring to is https://gerrit.wikimedia.org/r/c/mediawiki/extensions/PageForms/+/917159.

@Rand(1,2022) The rule is documented at https://github.com/wikimedia/eslint-plugin-mediawiki/blob/v0.5.0/docs/rules/class-doc.md. I believe the problem is that your comment is detailing the local variable assignment on line 652, instead the actual variable addClass() call on line 653. The warning is emitted from line 653. If you place the comment there instead, I think the linter will start to pass.

Rand(1,2022) (talkcontribs)

Thanks, that sounds like a more plausible explanation. I will give that a try.