Skip to content

ESDoc doesn't parse comment after object containing other objects without a ; at the end #549

Open
@BarbourSmith

Description

@BarbourSmith

Make sure these boxes are checked before submitting your issue - thank you!
(If your issue is neither a both bug nor a request, please write in a free style)

Short summary of your issue

ESdoc requires a semicolon after an object containing objects before it will recognize the documentation of the next line.

Input data for reproducing

Configuration

{
  "source": "./src",
  "destination": "./dist/documentation",
  "excludes": ["lib"],
  "plugins": [{"name": "esdoc-standard-plugin"}]
}

Codes

/** 
 * A description.
 * @type {object}
 */
this.materialProperties = {
    paper: {
        roughness: 0.5,
        metalness: 0.0,
        reflectivity: 0.5
    },
    wood: {
        roughness: 0.5,
        metalness: 0.0,
        reflectivity: 0.5
    },
    metal: {
        roughness: 0.5,
        metalness: 0.5,
        reflectivity: 0.9,
        clearCoat: 1,
        clearCoatRoughness: 0
    },
    glass: {
        roughness: 0.5,
        metalness: 0.5,
        reflectivity: 0.9,
        clearCoat: 1,
        clearCoatRoughness: 0,
        opacity: 0.5,
        transparent: true
    }
}

/** 
 * The camera which controls how the scene is rendered.
 * @type {object}
 */
this.camera = new THREE.PerspectiveCamera(27, window.innerWidth / window.innerHeight, 1, 10500);

What happens is that this.camera is not documented unless there is a ';' after this.materialProperties. The tricky thing is that if I put the semi colon there, then my pull request fails lint because the project stipulates no semicolons so I either fail lint or fail for not having documented.

What should I do?

Screen shot of documentation

image

Your environment

  • Windows 10
  • Node v12.7.0 (but also tested on V10)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions