Skip to content

Commit 24d7796

Browse files
committed
Enable rule to prevent use of emphasis in place of a heading
1 parent a1bccb5 commit 24d7796

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

etc/eslint/rules/stdlib.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,57 @@ rules[ 'stdlib/jsdoc-no-duplicate-headings' ] = 'error';
960960
*/
961961
rules[ 'stdlib/jsdoc-no-duplicate-headings-in-section' ] = 'error';
962962

963+
/**
964+
* Prevent use of emphasis in place of a heading.
965+
*
966+
* @name jsdoc-no-emphasis-as-heading
967+
* @memberof rules
968+
* @type {string}
969+
* @default 'error'
970+
*
971+
* @example
972+
* // Bad...
973+
*
974+
* /**
975+
* * Boop beep.
976+
* *
977+
* * _Boop_
978+
* *
979+
* * Beep.
980+
* *
981+
* * @return {string} a value
982+
* *
983+
* * @examples
984+
* * var str = beep();
985+
* * // returns 'boop'
986+
* *\/
987+
* function beep() {
988+
* return 'boop';
989+
* }
990+
*
991+
*
992+
* @example
993+
* // Good...
994+
*
995+
* /**
996+
* * Boop beep.
997+
* *
998+
* * ## Boop
999+
* *
1000+
* * Beep.
1001+
* *
1002+
* * @return {string} a value
1003+
* *
1004+
* * @examples
1005+
* * var str = beep();
1006+
* * // returns 'boop'
1007+
* *\/
1008+
* function beep() {
1009+
* return 'boop';
1010+
* }
1011+
*/
1012+
rules[ 'stdlib/jsdoc-no-emphasis-as-heading' ] = 'error';
1013+
9631014
/**
9641015
* Prevent indentation of heading content.
9651016
*

0 commit comments

Comments
 (0)