File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -737,6 +737,56 @@ rules[ 'stdlib/jsdoc-no-auto-link-without-protocol' ] = 'error';
737737*/
738738rules [ 'stdlib/jsdoc-no-blockquote-without-marker' ] = 'error' ;
739739
740+ /**
741+ * Do not allow duplicate definitions.
742+ *
743+ * @name jsdoc-no-duplicate-definitions
744+ * @memberof rules
745+ * @type {string }
746+ * @default 'error'
747+ * @see [list-item-bullet-indent]{@link https://github.com/wooorm/remark-lint/tree/master/packages/remark-lint-no-duplicate-definitions}
748+ *
749+ * @example
750+ * // Bad...
751+ *
752+ * /**
753+ * * Squares a [number][number].
754+ * *
755+ * * [number]: https://example.com
756+ * * [number]: https://example.com
757+ * *
758+ * * @arg {number} x - input number
759+ * * @return {number } x squared
760+ * *
761+ * * @examples
762+ * * var y = square( 2.0 );
763+ * * // returns 4.0
764+ * *\/
765+ * function square( x ) {
766+ * return x*x;
767+ * }
768+ *
769+ * @example
770+ * // Good...
771+ *
772+ * /**
773+ * * Squares a [number][number].
774+ * *
775+ * * [number]: https://example.com
776+ * *
777+ * * @arg {number} x - input number
778+ * * @return {number } x squared
779+ * *
780+ * * @examples
781+ * * var y = square( 2.0 );
782+ * * // returns 4.0
783+ * *\/
784+ * function square( x ) {
785+ * return x*x;
786+ * }
787+ */
788+ rules [ 'stdlib/jsdoc-no-duplicate-definitions' ] = 'error' ;
789+
740790/**
741791* Require that only allowed JSDoc tags are used.
742792*
You can’t perform that action at this time.
0 commit comments