Skip to content

Add documentation for the requireJSDoc rule #208

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

Closed
allthesignals opened this issue Apr 18, 2019 · 3 comments
Closed

Add documentation for the requireJSDoc rule #208

allthesignals opened this issue Apr 18, 2019 · 3 comments

Comments

@allthesignals
Copy link
Contributor

There needs to be documentation added for this new rule, requirejsdoc.

Noticed after merging that this was submitted without the accompanying documentation. That would be a nice follow up PR.

Originally posted by @gajus in #205 (comment)

@allthesignals
Copy link
Contributor Author

In spite of passing tests, this feature isn't where it needs to be, and so can't fully be documented. Currently, it does not seem possible to override these defaults:
https://github.com/gajus/eslint-plugin-jsdoc/blob/master/src/rules/requireJsdoc.js#L8-L27

At a bare minimum, you can enable this rule by adding the following to your rules object:
"jsdoc/require-jsdoc": 1

This will enforce FunctionDeclaration, but not the others, and I cannot find a way to override these defaults (hence my inability to write full documentation).

It seems like additional changes to iterateJsdoc.js are needed for the linter to correctly pick up the "options" seen in the unit tests.

More broadly, I think this happened because of a lack of testing for https://github.com/gajus/eslint-plugin-jsdoc/blob/master/src/iterateJsdoc.js, or lack of inclusion of this step into the test suite, either of which would probably help with coverage.

I can take a longer look after this week!

@brettz9
Copy link
Collaborator

brettz9 commented May 15, 2019

The options seem to be working for me, including outside of the tests... I'm picking up {require: {ClassDeclaration: true}} for example.

@gajus gajus closed this as completed May 15, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…check-types should be checking borrows and namepath types; flesh out require-jsdoc including scopes and tags/aliases

- Fix: Remove `parameter` as accepted synonym for `@param` (not listed at site)
- Enhancement: Have `require-hyphen-before-param-description` check `tagNamePreference` setting
- Refactoring: Avoid checking for preferred name for `example` (as there are no official synonyms)
- Refactoring: Toward resolving gajus#216, group settings by which rules use them
- Refactoring: Rename `isLink` inner function to `isInlineTag` for accuracy
- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…check-types should be checking borrows and namepath types; flesh out require-jsdoc including scopes and tags/aliases

- Fix: Remove `parameter` as accepted synonym for `@param` (not listed at site)
- Enhancement: Have `require-hyphen-before-param-description` check `tagNamePreference` setting
- Refactoring: Avoid checking for preferred name for `example` (as there are no official synonyms)
- Refactoring: Toward resolving gajus#216, group settings by which rules use them
- Refactoring: Rename `isLink` inner function to `isInlineTag` for accuracy
- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…check-types should be checking borrows and namepath types; flesh out require-jsdoc including scopes and tags/aliases

- Fix: Remove `parameter` as accepted synonym for `@param` (not listed at site)
- Enhancement: Have `require-hyphen-before-param-description` check `tagNamePreference` setting
- Refactoring: Avoid checking for preferred name for `example` (as there are no official synonyms)
- Refactoring: Toward resolving gajus#216, group settings by which rules use them
- Refactoring: Rename `isLink` inner function to `isInlineTag` for accuracy
- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…check-types should be checking borrows and namepath types; flesh out require-jsdoc including scopes and tags/aliases

- Fix: Remove `parameter` as accepted synonym for `@param` (not listed at site); affects `check-tag-names` and various param rules
- Enhancement: Have `require-hyphen-before-param-description` check `tagNamePreference` setting
- Refactoring: Avoid checking for preferred name for `example` (as there are no official synonyms)
- Refactoring: Toward resolving gajus#216, group settings by which rules use them
- Refactoring: Rename `isLink` inner function to `isInlineTag` for accuracy
- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…check-types should be checking borrows and namepath types; flesh out require-jsdoc including scopes and tags/aliases

- Fix: Remove `parameter` as accepted synonym for `@param` (not listed at site); affects `check-tag-names` and various param rules
- Enhancement: Have `require-hyphen-before-param-description` check `tagNamePreference` setting
- Refactoring: Avoid checking for preferred name for `example` (as there are no official synonyms)
- Refactoring: Toward resolving gajus#216, group settings by which rules use them
- Refactoring: Rename `isLink` inner function to `isInlineTag` for accuracy
- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…check-types should be checking borrows and namepath types; flesh out require-jsdoc including scopes and tags/aliases

- Fix: Remove `parameter` as accepted synonym for `@param` (not listed at site); affects `check-tag-names` and various param rules
- Enhancement: Have `require-hyphen-before-param-description` check `tagNamePreference` setting
- Refactoring: Avoid checking for preferred name for `example` (as there are no official synonyms)
- Refactoring: Toward resolving gajus#216, group settings by which rules use them
- Refactoring: Rename `isLink` inner function to `isInlineTag` for accuracy
- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…check-types should be checking borrows and namepath types; flesh out require-jsdoc including scopes and tags/aliases

- Fix: Remove `parameter` as accepted synonym for `@param` (not listed at site); affects `check-tag-names` and various param rules
- Enhancement: Have `require-hyphen-before-param-description` check `tagNamePreference` setting
- Refactoring: Avoid checking for preferred name for `example` (as there are no official synonyms)
- Refactoring: Toward resolving gajus#216, group settings by which rules use them
- Refactoring: Rename `isLink` inner function to `isInlineTag` for accuracy
- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…check-types should be checking borrows and namepath types; flesh out require-jsdoc including scopes and tags/aliases

- Enhancement: Have `require-hyphen-before-param-description` check `tagNamePreference` setting
- Refactoring: Avoid checking for preferred name for `example` (as there are no official synonyms)
- Refactoring: Toward resolving gajus#216, group settings by which rules use them
- Refactoring: Rename `isLink` inner function to `isInlineTag` for accuracy
- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…check-types should be checking borrows and namepath types; flesh out require-jsdoc including scopes and tags/aliases

- Enhancement: Have `require-hyphen-before-param-description` check `tagNamePreference` setting
- Refactoring: Avoid checking for preferred name for `example` (as there are no official synonyms)
- Refactoring: Toward resolving gajus#216, group settings by which rules use them
- Refactoring: Rename `isLink` inner function to `isInlineTag` for accuracy
- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…check-types should be checking borrows and namepath types; flesh out require-jsdoc including scopes and tags/aliases

- Enhancement: Have `require-hyphen-before-param-description` check `tagNamePreference` setting
- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…cking borrows and namepath types; expand valid-types tags in docs; flesh out require-jsdoc docs including scopes and tags/aliases

- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…cking borrows and namepath types; expand valid-types tags in docs; flesh out require-jsdoc docs including scopes and tags/aliases

- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…cking borrows and namepath types; expand valid-types tags in docs; flesh out require-jsdoc docs including scopes and tags/aliases

- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 17, 2019
…cking borrows and namepath types; expand valid-types tags in docs; flesh out require-jsdoc docs including scopes and tags/aliases

- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 17, 2019
…docs including scopes and tags/aliases

- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 17, 2019
…docs including scopes and tags/aliases

- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 17, 2019
…iases

- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags/aliases listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
- Docs: Add "Settings" column in rule tables to indicate applicable settings
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 17, 2019
…iases

- Docs: Toward resolving gajus#216, document which rules employ each of the settings
- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags/aliases listed for rules
- Docs: Observation about `Object.create(null)` and `check-types`
- Docs: Add "Settings" column in rule tables to indicate applicable settings
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 17, 2019
…of the settings

- Docs: Add require-jsdoc docs per gajus#208
- Docs: Fix/add to tags/aliases listed for rules
- Docs: Add "Settings" column in rule tables to indicate applicable settings
- Docs: Observation about `Object.create(null)` and `check-types`
- Refactoring: Avoid nested `if`
@brettz9
Copy link
Collaborator

brettz9 commented May 17, 2019

I've added some docs for require-jsdoc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants