Skip to content

Explicitly setting pedantic to false generates error #22

Closed
@ripperdoc

Description

@ripperdoc

As I experimented with JSDoc API, I tried the following code:

const jsdoc = require('jsdoc-api')
jsdoc.explainSync({files: 'functions/engine/scenarios.js', pedantic: false});

Unfortunately, that throws an error, where it seems as if false has been mistaken for a path.

/Users/martin/dev/src/fictive-tools/node_modules/jsdoc-api/lib/jsdoc-command.js:114
      throw err
      ^

JSDOC_ERROR: ERROR: Unable to find the source file or directory /Users/martin/dev/src/fictive-tools/false
    at ExplainSync.verifyOutput (/Users/martin/dev/src/fictive-tools/node_modules/jsdoc-api/lib/jsdoc-command.js:112:19)
    at ExplainSync._runJsdoc (/Users/martin/dev/src/fictive-tools/node_modules/jsdoc-api/lib/explain-sync.js:34:32)
    at ExplainSync.getOutput (/Users/martin/dev/src/fictive-tools/node_modules/jsdoc-api/lib/explain-sync.js:17:19)
    at ExplainSync.execute (/Users/martin/dev/src/fictive-tools/node_modules/jsdoc-api/lib/jsdoc-command.js:49:24)
    at Object.explainSync (/Users/martin/dev/src/fictive-tools/node_modules/jsdoc-api/index.js:20:18)
    at Object.<anonymous> (/Users/martin/dev/src/fictive-tools/test.js:2:7)
    at Module._compile (internal/modules/cjs/loader.js:1185:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
    at Module.load (internal/modules/cjs/loader.js:1034:32)
    at Function.Module._load (internal/modules/cjs/loader.js:923:14)

Calling with true works, however.

Thanks,
Martin

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions