Skip to content

Commit 9d22831

Browse files
committed
docs: generate docs
1 parent b596e09 commit 9d22831

File tree

3 files changed

+97
-0
lines changed

3 files changed

+97
-0
lines changed

.README/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This table maps the rules between `eslint-plugin-jsdoc` and `jscs-jsdoc`.
1414

1515
| `eslint-plugin-jsdoc` | `jscs-jsdoc` |
1616
| --- | --- |
17+
| [`check-alignment`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-alignment) | N/A |
1718
| [`check-examples`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-examples) | N/A |
1819
| [`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) |
1920
| [`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) |
@@ -71,6 +72,7 @@ Finally, enable all of the rules that you would like to use.
7172
```json
7273
{
7374
"rules": {
75+
"jsdoc/check-alignment": 1,
7476
"jsdoc/check-examples": 1,
7577
"jsdoc/check-param-names": 1,
7678
"jsdoc/check-tag-names": 1,
@@ -245,6 +247,7 @@ Finally, the following rule pertains to inline disable directives:
245247

246248
## Rules
247249

250+
{"gitdown": "include", "file": "./rules/check-alignment.md"}
248251
{"gitdown": "include", "file": "./rules/check-examples.md"}
249252
{"gitdown": "include", "file": "./rules/check-param-names.md"}
250253
{"gitdown": "include", "file": "./rules/check-tag-names.md"}

.README/rules/check-alignment.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### `check-alignment`
2+
3+
Reports invalid alignment of JSDoc block asterisks.
4+
5+
|||
6+
|---|---|
7+
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
8+
|Tags|N/A|
9+
10+
<!-- assertions checkAlignment -->

README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ JSDoc linting rules for ESLint.
1717
* [Allow `@override` Without Accompanying `@param` Tags](#eslint-plugin-jsdoc-settings-allow-override-without-accompanying-param-tags)
1818
* [Settings to Configure `check-examples`](#eslint-plugin-jsdoc-settings-settings-to-configure-check-examples)
1919
* [Rules](#eslint-plugin-jsdoc-rules)
20+
* [`check-alignment`](#eslint-plugin-jsdoc-rules-check-alignment)
2021
* [`check-examples`](#eslint-plugin-jsdoc-rules-check-examples)
2122
* [`check-param-names`](#eslint-plugin-jsdoc-rules-check-param-names)
2223
* [`check-tag-names`](#eslint-plugin-jsdoc-rules-check-tag-names)
@@ -45,6 +46,7 @@ This table maps the rules between `eslint-plugin-jsdoc` and `jscs-jsdoc`.
4546

4647
| `eslint-plugin-jsdoc` | `jscs-jsdoc` |
4748
| --- | --- |
49+
| [`check-alignment`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-alignment) | N/A |
4850
| [`check-examples`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-examples) | N/A |
4951
| [`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) |
5052
| [`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) |
@@ -104,6 +106,7 @@ Finally, enable all of the rules that you would like to use.
104106
```json
105107
{
106108
"rules": {
109+
"jsdoc/check-alignment": 1,
107110
"jsdoc/check-examples": 1,
108111
"jsdoc/check-param-names": 1,
109112
"jsdoc/check-tag-names": 1,
@@ -285,6 +288,87 @@ Finally, the following rule pertains to inline disable directives:
285288
<a name="eslint-plugin-jsdoc-rules"></a>
286289
## Rules
287290

291+
<a name="eslint-plugin-jsdoc-rules-check-alignment"></a>
292+
### <code>check-alignment</code>
293+
294+
Reports invalid alignment of JSDoc block asterisks.
295+
296+
|||
297+
|---|---|
298+
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
299+
|Tags|N/A|
300+
301+
The following patterns are considered problems:
302+
303+
````js
304+
/**
305+
* @param {Number} foo
306+
*/
307+
function quux (foo) {
308+
309+
}
310+
// Message: Expected JSDoc block to be aligned.
311+
312+
/**
313+
* @param {Number} foo
314+
*/
315+
function quux (foo) {
316+
317+
}
318+
// Message: Expected JSDoc block to be aligned.
319+
320+
/**
321+
* @param {Number} foo
322+
*/
323+
function quux (foo) {
324+
325+
}
326+
// Message: Expected JSDoc block to be aligned.
327+
328+
/**
329+
* @param {Number} foo
330+
*/
331+
function quux (foo) {
332+
333+
}
334+
// Message: Expected JSDoc block to be aligned.
335+
336+
/**
337+
* @param {Number} foo
338+
*/
339+
function quux (foo) {
340+
341+
}
342+
// Message: Expected JSDoc block to be aligned.
343+
````
344+
345+
The following patterns are not considered problems:
346+
347+
````js
348+
/**
349+
* Desc
350+
*
351+
* @param {Number} foo
352+
*/
353+
function quux (foo) {
354+
355+
}
356+
357+
/**
358+
* Desc
359+
*
360+
* @param {{
361+
foo: Bar,
362+
bar: Baz
363+
* }} foo
364+
*
365+
*/
366+
function quux (foo) {
367+
368+
}
369+
````
370+
371+
288372
<a name="eslint-plugin-jsdoc-rules-check-examples"></a>
289373
### <code>check-examples</code>
290374

0 commit comments

Comments
 (0)