documentationjs / documentationjs/documentation

simple module example generates a lint error

Open
#295 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
5.8k
Forks
481
PR merge metrics
No merged PRs in 30d

Description

`index.js`:

```
'use strict';

/**
* Square a number.
* @param {number} x - base
* @returns {number} x²
*/
module.exports.square = function (x) { return x * x; };
```

`documentation --lint` output:

```
3:1 warning @memberof reference to index not found
```

I tried using an explicit `@module`:

```
'use strict';

/**
* @module test
*/

/**
* Square a number.
* @param {number} x - base
* @returns {number} x²
*/
module.exports.square = function (x) { return x * x; };
```

`documentation --lint` output:

```
3:1 warning @memberof reference to test not found
7:1 warning @memberof reference to test not found
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.