Skip to content

Commit dadb314

Browse files
committed
build: enable lint rule
1 parent 8369472 commit dadb314

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

etc/eslint/rules/stdlib.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4424,6 +4424,39 @@ rules[ 'stdlib/require-order' ] = [ 'error', {
44244424
*/
44254425
rules[ 'stdlib/section-headers' ] = 'error';
44264426

4427+
/**
4428+
* Ensure that a tape file starts with the expected test.
4429+
*
4430+
* @name tape-first-test
4431+
* @memberof rules
4432+
* @type {string}
4433+
* @default 'error'
4434+
*
4435+
* @example
4436+
* // Bad...
4437+
*
4438+
* var tape = require( 'tape' );
4439+
* var identity = require( './../lib' );
4440+
*
4441+
* tape( 'the function works correctly', function test( t ) {
4442+
* t.strictEqual( identity( true ), true, 'returns true' );
4443+
* t.end();
4444+
* });
4445+
*
4446+
* @example
4447+
* // Good...
4448+
*
4449+
* var tape = require( 'tape' );
4450+
* var identity = require( './../lib' );
4451+
*
4452+
* tape( 'main export is a function', function test( t ) {
4453+
* t.ok( true, __filename );
4454+
* t.strictEqual( typeof identity, 'function', 'main export is a function' );
4455+
* t.end();
4456+
* });
4457+
*/
4458+
rules[ 'stdlib/tape-first-test' ] = 'error';
4459+
44274460
/**
44284461
* Require parentheses around ternary conditions.
44294462
*

0 commit comments

Comments
 (0)