@@ -18,6 +18,7 @@ JSDoc linting rules for ESLint.
18
18
* [ Settings to Configure ` check-examples ` ] ( #eslint-plugin-jsdoc-settings-settings-to-configure-check-examples )
19
19
* [ Rules] ( #eslint-plugin-jsdoc-rules )
20
20
* [ ` check-examples ` ] ( #eslint-plugin-jsdoc-rules-check-examples )
21
+ * [ ` check-indentation ` ] ( #eslint-plugin-jsdoc-rules-check-indentation )
21
22
* [ ` check-param-names ` ] ( #eslint-plugin-jsdoc-rules-check-param-names )
22
23
* [ ` check-tag-names ` ] ( #eslint-plugin-jsdoc-rules-check-tag-names )
23
24
* [ ` check-types ` ] ( #eslint-plugin-jsdoc-rules-check-types )
@@ -46,6 +47,7 @@ This table maps the rules between `eslint-plugin-jsdoc` and `jscs-jsdoc`.
46
47
| ` eslint-plugin-jsdoc ` | ` jscs-jsdoc ` |
47
48
| --- | --- |
48
49
| [ ` check-examples ` ] ( https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-examples ) | N/A |
50
+ | [ ` check-indentation ` ] ( https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-indentation ) | N/A |
49
51
| [ ` check-param-names ` ] ( https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-param-names ) | [ ` checkParamNames ` ] ( https://github.com/jscs-dev/jscs-jsdoc#checkparamnames ) |
50
52
| [ ` check-tag-names ` ] ( https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-tag-names ) | N/A ~ [ ` checkAnnotations ` ] ( https://github.com/jscs-dev/jscs-jsdoc#checkannotations ) |
51
53
| [ ` check-types ` ] ( https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-types ) | [ ` checkTypes ` ] ( https://github.com/jscs-dev/jscs-jsdoc#checktypes ) |
@@ -105,6 +107,7 @@ Finally, enable all of the rules that you would like to use.
105
107
{
106
108
"rules" : {
107
109
"jsdoc/check-examples" : 1 ,
110
+ "jsdoc/check-indentation" : 1 ,
108
111
"jsdoc/check-param-names" : 1 ,
109
112
"jsdoc/check-tag-names" : 1 ,
110
113
"jsdoc/check-types" : 1 ,
@@ -485,6 +488,46 @@ function quux () {}
485
488
````
486
489
487
490
491
+ <a name =" eslint-plugin-jsdoc-rules-check-indentation " ></a >
492
+ ### <code >check-indentation</code >
493
+
494
+ Reports invalid padding inside JSDoc block.
495
+
496
+ |||
497
+ | ---| ---|
498
+ | Context| ` ArrowFunctionExpression ` , ` FunctionDeclaration ` , ` FunctionExpression ` |
499
+ | Tags| N/A|
500
+
501
+ The following patterns are considered problems:
502
+
503
+ ```` js
504
+ /**
505
+ * foo
506
+ *
507
+ * @param bar
508
+ * baz
509
+ */
510
+ function quux () {
511
+
512
+ }
513
+ // Message: There must be no indentation.
514
+ ````
515
+
516
+ The following patterns are not considered problems:
517
+
518
+ ```` js
519
+ /**
520
+ * foo
521
+ *
522
+ * @param bar
523
+ * baz
524
+ */
525
+ function quux () {
526
+
527
+ }
528
+ ````
529
+
530
+
488
531
<a name =" eslint-plugin-jsdoc-rules-check-param-names " ></a >
489
532
### <code >check-param-names</code >
490
533
0 commit comments