Skip to content

Generate documentation for code with return outside function #1411

@kozi

Description

@kozi

I am trying to generate jsdoc documentation for code with return statements outside of functions.
Since the 3.5.0 release babylon is used as parser and the parser treats this as an error.

The babylon parser has some Options https://github.com/babel/babylon#options
allowReturnOutsideFunction By default, a return statement at the top level raises an error. Set this to true to accept such code.

IDEA: Add the possibility to customize the parserOptions in the jsdoc config file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions