Repository navigation
Require JsDoc on validators #44893
Copy link
Copy link
Closed
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
Description
Activity
- addedfeature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
on Oct 4, 2022 We already use
eslint-plugin-jsdocfor JSDoc linting. We turn on the recommended rules for it:Lines 41 to 42 in e84e2e6
extends: ['eslint:recommended', 'plugin:jsdoc/recommended'], plugins: ['jsdoc', 'markdown', 'node-core'], But then we turn a bunch of them off:
Lines 304 to 314 in e84e2e6
// JSDoc recommended rules that we disable 'jsdoc/require-jsdoc': 'off', 'jsdoc/require-param-description': 'off', 'jsdoc/newline-after-description': 'off', 'jsdoc/require-returns-description': 'off', 'jsdoc/valid-types': 'off', 'jsdoc/no-undefined-types': 'off', 'jsdoc/require-param': 'off', 'jsdoc/check-tag-names': 'off', 'jsdoc/require-returns': 'off', 'jsdoc/require-property-description': 'off', So maybe enabling one of those disabled rules will accomplish what you are looking for?
Does #44896 do what you are looking for? Or are there validators in other files that you are looking to apply JSDoc comments to?
Reacted by tianc43Reacted by Yagiz NizipliYes this was what I was looking for. Thanks @Trott
- added a commit that references this issue
on Oct 11, 2022
Metadata
Metadata
Assignees
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
What is the problem this feature will solve?
This change will enforce the use of JSDocs in internal validators and make it easier for developers to contribute the validators with correct parameters (and auto-completion)
What is the feature you are proposing to solve the problem?
Using an eslint rule to enforce jsdoc for
lib/validators.jsWhat alternatives have you considered?
Nothing