Skip to content

jsdoc/check-access Restriction

What it does

Checks that @access tags use one of the following values:

  • "package", "private", "protected", "public"

Also reports:

  • Mixing of @access with @public, @private, @protected, or @package on the same doc block.
  • Use of multiple instances of @access (or the @public, etc) on the same doc block.

Why is this bad?

It is important to have a consistent way of specifying access levels.

Examples

Examples of incorrect code for this rule:

javascript
/** @access private @public */

/** @access invalidlevel */

Examples of correct code for this rule:

javascript
/** @access private */

/** @private */

References

Released under the MIT License.