Skip to content

Files

Latest commit

 

History

History
30 lines (24 loc) · 615 Bytes

check-property-names.md

File metadata and controls

30 lines (24 loc) · 615 Bytes

Pattern: Invalid property documentation

Issue: -

Description

Property names in JSDoc must not be duplicated within the same block, and nested properties must have their parent properties defined as objects.

Examples

Example of incorrect code:

/**
 * @typedef {object} Config
 * @property {string} name
 * @property {number} name
 * @property {string} deep.nested.prop
 */

Example of correct code:

/**
 * @typedef {object} Config
 * @property {string} name
 * @property {object} deep
 * @property {object} deep.nested
 * @property {string} deep.nested.prop
 */