openpgpjs/.jsdocrc.cjs
larabr 97d341a11f
Linter: enforce JSDoc @access directive
To make sure only user-facing entities are included in the docs,
since access is public by default.

NB: the top-level access directive seems to work to hide index entrypoint files,
but in other cases (e.g. s2k submodules), exported functions may need to
manually be marked as private.

Also, the 'initialCommentsOnly' rule sometimes reports false positives
in case of multiple comment blocks separated by new lines. The solution
is to remove the new lines.
2025-11-05 12:01:02 +01:00

29 lines
649 B
JavaScript

const pkg = require('./package.json');
module.exports = {
plugins: [
'plugins/markdown',
'node_modules/better-docs/typedef-import',
'node_modules/better-docs/typescript'
],
markdown: {
idInHeadings: true
},
templates: {
default: {
includeDate: false,
outputSourceFiles: false,
externalSourceLinks: {
urlPrefix: `${pkg.repository.url}/blob/v${pkg.version}/src/`
}
}
},
source: {
includePattern: "\\.(js|ts)$",
include: ['src/', 'README.md']
},
opts: {
recurse: true,
},
};