Skip to content

[RFC]: Add ESLint rule to enforce one blank line between requires and example code in JSDoc #42

@Planeshifter

Description

@Planeshifter

In JSDoc @example tags, we want to enforce one empty line between requires and following code.

For example,

/**
* Fréchet distribution constructor.
*
* @module @stdlib/stats/base/dists/frechet/ctor
*
* @example
* var Frechet = require( '@stdlib/stats/base/dists/frechet/ctor' );
*
* var frechet = new Frechet( 1.0, 1.0, 0.5 );
*
* var y = frechet.cdf( 0.8 );
* // returns ~0.036
*/

would pass whereas the below should fail:

/**
* Fréchet distribution constructor.
*
* @module @stdlib/stats/base/dists/frechet/ctor
*
* @example
* var Frechet = require( '@stdlib/stats/base/dists/frechet/ctor' );
* var frechet = new Frechet( 1.0, 1.0, 0.5 );
*
* var y = frechet.cdf( 0.8 );
* // returns ~0.036
*/

Time estimate with AI: 30min
Time estimate without AI: 45min.

Metadata

Metadata

Assignees

Labels

FeatureTask to add a new feature.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.estimate: <2hrsTask which should take less than 2 hours.🤖 AIAllowed to use AI.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions