Hi,
When I've got familiar with Eslint, my first idea was that it would be
useful to write a rule that enforces developers to comment all of the
functions in the code base.
I've already written the rule. It checks whether there is a description of
the behaviour and whether all of the parameters and the return value are
covered by comments. And that's all.
I'm sure this will be very handy in my workflow, but what do you think? Is
this a good approach? I'm asking it, because it could be the part of the
core rule set of Eslint and I'm planning a pull request.
Actually, I've reached the purpose with the API method getComments(...) and
I've also ran into a problem:
My rule checks FunctionDeclaration, VariableDeclaration and Property nodes.
Unfortunately, getComments(...) doesn't work on AssignmentExpression nodes,
but that is needed to reach the goal, because
some developers may write code in the following way:
MyConstructor.prototype.doSomething = function () { ... };
Presently, the code cannot check the existence of comments on these code
nodes.
The version of eslint with which I've ran the code is v0.2.0.
What do you think? Would pull request of this rule be welcomed?
Best regards.
--
You received this message because you are subscribed to the Google Groups
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.