Skip to content

Commit cdb22aa

Browse files
committed
Switch out for custom rules
1 parent 09a849b commit cdb22aa

File tree

2 files changed

+75
-72
lines changed

2 files changed

+75
-72
lines changed

etc/eslint/rules/stdlib.js

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,20 @@ rules[ 'stdlib/jsdoc-leading-description-sentence' ] = [ 'error', {
654654
*/
655655
rules[ 'stdlib/jsdoc-linebreak-style' ] = [ 'error', 'unix' ];
656656

657+
/**
658+
* Require that heading lengths be less than or equal to `80` characters.
659+
*
660+
* @see [maximum-heading-length]{@link https://github.com/wooorm/remark-lint/tree/master/packages/remark-lint-maximum-heading-length}
661+
*/
662+
rules[ 'stdlib/jsdoc-maximum-heading-length' ] = [ 'error', 80 ];
663+
664+
/**
665+
* Do not enforce a maximum line length.
666+
*
667+
* @see [maximum-line-length]{@link https://github.com/wooorm/remark-lint/tree/master/packages/remark-lint-maximum-line-length}
668+
*/
669+
rules[ 'stdlib/jsdoc-maximum-line-length' ] = [ 'off' ];
670+
657671
/**
658672
* Require double quotes for link titles.
659673
*
@@ -799,6 +813,67 @@ rules[ 'stdlib/jsdoc-list-item-bullet-indent' ] = 'error';
799813
*/
800814
rules[ 'stdlib/jsdoc-list-item-content-indent' ] = 'error';
801815

816+
/**
817+
* Require list items use tab-size indentation.
818+
*
819+
* @see [list-item-indent]{@link https://github.com/wooorm/remark-lint/tree/master/packages/remark-lint-list-item-indent}
820+
*
821+
* @example
822+
* // Bad...
823+
*
824+
* /**
825+
* * Squares a number.
826+
* *
827+
* * Hello
828+
* * World
829+
* *
830+
* * @param {number} x - input number
831+
* * @returns {number} x squared
832+
* *
833+
* * @example
834+
* * var y = square( 2.0 );
835+
* * // returns 4.0
836+
* *\/
837+
*
838+
* @example
839+
* // Good...
840+
*
841+
* /**
842+
* * Squares a number.
843+
* *
844+
* * - Hello
845+
* * - World
846+
* *
847+
* * @param {number} x - input number
848+
* * @returns {number} x squared
849+
* *
850+
* * @example
851+
* * var y = square( 2.0 );
852+
* * // returns 4.0
853+
* *\/
854+
*
855+
* @example
856+
* // Good...
857+
*
858+
* /**
859+
* * Squares a number.
860+
* *
861+
* * - Beep
862+
* * boop
863+
* *
864+
* * - Bop
865+
* * bip
866+
* *
867+
* * @param {number} x - input number
868+
* * @returns {number} x squared
869+
* *
870+
* * @example
871+
* * var y = square( 2.0 );
872+
* * // returns 4.0
873+
* *\/
874+
*/
875+
rules[ 'stdlib/jsdoc-list-item-indent' ] = [ 'error', 'tab-size' ];
876+
802877
/**
803878
* Lint JSDoc descriptions using remark.
804879
*

etc/remark/plugins/lint/jsdoc.js

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -126,58 +126,6 @@ plugins.push([
126126
[ 'error', 'atx' ]
127127
]);
128128

129-
/**
130-
* Require double quotes for link titles.
131-
*
132-
* @see [link-title-style]{@link https://github.com/wooorm/remark-lint/tree/master/packages/remark-lint-link-title-style}
133-
*
134-
* @example
135-
* <!-- Bad -->
136-
*
137-
* [example](https://example.com (Example))
138-
*
139-
* @example
140-
* <!-- Good -->
141-
*
142-
* [example](https://example.com "Example")
143-
*/
144-
plugins.push([
145-
require( 'remark-lint-link-title-style' ),
146-
[ 'error', '"' ]
147-
]);
148-
149-
/**
150-
* Require list items use tab-size indentation.
151-
*
152-
* @see [list-item-indent]{@link https://github.com/wooorm/remark-lint/tree/master/packages/remark-lint-list-item-indent}
153-
*
154-
* @example
155-
* <!-- Bad -->
156-
*
157-
* * Hello
158-
* * World
159-
*
160-
* @example
161-
* <!-- Good -->
162-
*
163-
* * Hello
164-
* * World
165-
*
166-
* @example
167-
* <!-- Good -->
168-
*
169-
* * Beep
170-
* boop
171-
*
172-
* * Bop
173-
* bip
174-
*
175-
*/
176-
plugins.push([
177-
require( 'remark-lint-list-item-indent' ),
178-
[ 'error', 'tab-size' ]
179-
]);
180-
181129
/**
182130
* Require consistent list item spacing.
183131
*
@@ -213,26 +161,6 @@ plugins.push([
213161
[ 'error' ]
214162
]);
215163

216-
/**
217-
* Require that heading lengths be less than or equal to `80` characters.
218-
*
219-
* @see [maximum-heading-length]{@link https://github.com/wooorm/remark-lint/tree/master/packages/remark-lint-maximum-heading-length}
220-
*/
221-
plugins.push([
222-
require( 'remark-lint-maximum-heading-length' ),
223-
[ 'error', 80 ]
224-
]);
225-
226-
/**
227-
* Do not enforce a maximum line length.
228-
*
229-
* @see [maximum-line-length]{@link https://github.com/wooorm/remark-lint/tree/master/packages/remark-lint-maximum-line-length}
230-
*/
231-
plugins.push([
232-
require( 'remark-lint-maximum-line-length' ),
233-
[ 'off' ]
234-
]);
235-
236164
/**
237165
* Allow multiple top-level headings.
238166
*

0 commit comments

Comments
 (0)