`require-jsdoc` for `constructor`
See original GitHub issueTell us about your environment
- ESLint Version: 3.9.0
- Node Version: 7.9.0
- npm Version: Using latest
Yarn
What parser (default, Babel-ESLint, etc.) are you using? Babel-ESLint
Please show your full configuration: It’s very huge, you can find it here svipben/react-boilerplate.
SUGGESTION
I have suggestion to include new property in require-jsdoc
rule for constructor
, because right now I use JSDoc for class
which explains constructor
usage and I’m using comments for variables, etc. so it’s really unnecessary to rewrite everything inside constructor
when everything is explained above class
and in variables, etc. which are in constructor
.
Right now ESLint have these properties in require-jsdoc
rule:
"FunctionDeclaration": true,
"MethodDefinition": false,
"ClassDeclaration": false,
"ArrowFunctionExpression": false
My suggestion is to add for e.g. ClassConstructor
or something like that, it’s up to you. This property will not check if constructor
inside class
have JSDoc.
I know I can simply disable this rule, ignore warnings, but I’m extensively using ESLint and it really helps me a lot when I forget about JSDoc which will be very good in future to know why, how, etc.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:6 (4 by maintainers)
Top GitHub Comments
Seems reasonable to me. 👍 from me, let’s see what the team thinks.
Thanks for your interest in improving ESLint. Unfortunately, it looks like this issue didn’t get consensus from the team, so I’m closing it. We define consensus as having three 👍s from team members, as well as a team member willing to champion the proposal. This is a high bar by design – we can’t realistically accept and maintain every feature request in the long term, so we only accept feature requests which are useful enough that there is consensus among the team that they’re worth adding.
Since ESLint is pluggable and can load custom rules at runtime, the lack of consensus among the ESLint team doesn’t need to be a blocker for you using this in your project, if you’d find it useful. It just means that you would need to implement the rule yourself, rather than using a bundled rule that is packaged with ESLint.