Skip to content

Commit

Permalink
Add check-lines-alignment documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
renatho authored and Brett Zamir committed Jan 11, 2021
1 parent 095ff36 commit 24eae58
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .README/rules/check-lines-alignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
### `check-alignment`

Reports invalid alignment of JSDoc block lines.

|||
|---|---|
|Context|everywhere|
|Tags|`param`, `arg`, `argument`, `property`, `prop`|

The following patterns are considered problems:

````js
/**
* Function description.
*
* @param {string} lorem Description.
* @param {int} sit Description multi words.
*/
const fn = ( lorem, sit ) => {}
// Message: Expected JSDoc block lines to be aligned.

/**
* My object.
*
* @typedef {Object} MyObject
*
* @property {string} lorem Description.
* @property {int} sit Description multi words.
*/
// Message: Expected JSDoc block lines to be aligned.

The following patterns are not considered problems:

````js
/**
* Function description.
*
* @param {string} lorem Description.
* @param {int} sit Description multi words.
*/
const fn = ( lorem, sit ) => {}

/**
* My object.
*
* @typedef {Object} MyObject
*
* @property {string} lorem Description.
* @property {int} sit Description multi words.
*/
````

0 comments on commit 24eae58

Please sign in to comment.