Skip to content

Way to feed no-undefined-types additional files or have it auto-detect them (and finding unused types within the same set of files); avoid defects of tampering with no-unused-vars #99

Closed
@brettz9

Description

@brettz9

For no-undefined-types, I'd like a way to feed one's project files, whether:

  1. Detected by static or dynamic import/require, with the entry file(s) determined by:
    1. a new eslint-plugin-jsdoc option
    2. use of main or exports in package.json
    3. use of jsdoc config
  2. By a file being present in one's jsdoc config
  3. If eslint-plugin-jsdoc were supplied an array of files for finding typedefs

I need more context because some of my types are in:

  • A purely-comment-based typedefs.js file which includes external and generic types
  • Other files and modules

I'd like it to report for:

/**
* @param {MyType}
*/

...where MyType is not defined anywhere within JSDoc typedefs/interfaces across all files. The corollary is thus not to report errors for:

// One file, such as `typedefs.js`
/**
* @typedef {object} MyType
*/
/**
* @interface AnotherType
*/

// Another file:
/**
* @param {MyType}
*/

/**
* @param {AnotherType}
*/

Thanks very much for the very useful plugin!

Update: While traversing files of a project, also consider supporting @inheritdoc per #765


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions