diff --git a/.README/rules/check-lines-alignment.md b/.README/rules/check-lines-alignment.md new file mode 100644 index 000000000..77041476e --- /dev/null +++ b/.README/rules/check-lines-alignment.md @@ -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. + */ +````