-
Notifications
You must be signed in to change notification settings - Fork 26.8k
Stricter rules for comments #1425
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
Comments
They indeed can be; we've intentionally chosen not to, as there doesn't seem to be much value in legislating comments in this way. Since comments should never describe "what" (should never be documentation), only "why" or history/motivation, this just doesn't come up much in practice. |
Ok, I understand your reasons. I only thought that since they were in the documentation, they could also be in the lint configuration. I will still use them in my projects where it will make sense. One more question if I may. As per section 18.1 I know you use But isn't this a JSDoc style comment? (possible problems for the JSDoc parser?) /**
* Multiple
* lines
* comment
*/ ...instead of the common C style comment (although I find that it does't look as good) /*
* Multiple
* lines
* comment
*/ |
Generally I'd say you're absolutely right! For It's a JSDoc-style comment if it's following the conventions for jsdoc; certainly if a jsdoc parser would break on it, it's not jsdoc-style. I don't think there's a particularly strong reason to start multiline comments with |
I will make a PR just for the Thank you for your clarification regarding I will do it next week as I am on the road at the moment. |
I don't see much value in supporting the extra |
As per the documentation on comments (sections 18.2 & 18.3) I think stricter rules can be enforced. Below is something I have tested in my projects.
The
/
marker is commonly used by some libraries (ex: angular-gettext) to denote documentation./// Special comment
The text was updated successfully, but these errors were encountered: