File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -247,6 +247,59 @@ rules[ 'stdlib/jsdoc-checkbox-content-indent' ] = 'error';
247247*/
248248rules [ 'stdlib/jsdoc-code-block-style' ] = [ 'error' , 'fenced' ] ;
249249
250+ /**
251+ * Require fenced code blocks to have a language flag.
252+ *
253+ * @see [fenced-code-flag]{@link https://github.com/wooorm/remark-lint/tree/master/packages/remark-lint-fenced-code-flag}
254+ *
255+ * @example
256+ * // Bad...
257+ *
258+ * /**
259+ * * Squares a number.
260+ * *
261+ * * ```
262+ * * y = x;
263+ * * ```
264+ * *
265+ * * @param {number } x - input number
266+ * * @returns {number } x squared
267+ * *
268+ * * @example
269+ * * var y = square( 2.0 );
270+ * * // returns 4.0
271+ * *\/
272+ * function square( x ) {
273+ * return x*x;
274+ * }
275+ *
276+ * @example
277+ * // Good...
278+ *
279+ * /**
280+ * * Squares a number.
281+ * *
282+ * * ```javascript
283+ * * y = x;
284+ * * ```
285+ * *
286+ * * @param {number } x - input number
287+ * * @returns {number } x squared
288+ * *
289+ * * @example
290+ * * var y = square( 2.0 );
291+ * * // returns 4.0
292+ * *\/
293+ * function square( x ) {
294+ * return x*x;
295+ * }
296+ */
297+ rules [ 'stdlib/jsdoc-fenced-code-flag' ] = [
298+ 'error' , {
299+ 'allowEmpty' : false
300+ }
301+ ] ;
302+
250303/**
251304* Require lowercased definition labels.
252305*
Original file line number Diff line number Diff line change @@ -51,35 +51,6 @@ plugins.push([
5151 ]
5252] ) ;
5353
54- /**
55- * Require fenced code blocks to have a language flag.
56- *
57- * @see [fenced-code-flag]{@link https://github.com/wooorm/remark-lint/tree/master/packages/remark-lint-fenced-code-flag}
58- *
59- * @example
60- * <!-- Bad -->
61- *
62- * ```
63- * code
64- * ```
65- *
66- * @example
67- * <!-- Good -->
68- *
69- * ``` text
70- * code
71- * ```
72- */
73- plugins . push ( [
74- require ( 'remark-lint-fenced-code-flag' ) ,
75- [
76- 'error' ,
77- {
78- 'allowEmpty' : false
79- }
80- ]
81- ] ) ;
82-
8354/**
8455* Require ordered lists to use periods (e.g., `1.`, `2.`, etc).
8556*
You can’t perform that action at this time.
0 commit comments