Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 1.19 KB

check-indentation.md

File metadata and controls

62 lines (45 loc) · 1.19 KB

check-indentation

{"gitdown": "contents", "rootId": "check-indentation"}

Reports invalid padding inside JSDoc blocks.

Ignores parts enclosed in Markdown "code block"'s. For example, the following description is not reported:

/**
 * Some description:
 * ```html
 * <section>
 *   <title>test</title>
 * </section>
 * ```
 */

Options

This rule has an object option.

excludeTags

Array of tags (e.g., ['example', 'description']) whose content will be "hidden" from the check-indentation rule. Defaults to ['example'].

By default, the whole JSDoc block will be checked for invalid padding. That would include @example blocks too, which can get in the way of adding full, readable examples of code without ending up with multiple linting issues.

When disabled (by passing excludeTags: [] option), the following code will report a padding issue:

/**
 * @example
 * anArray.filter((a) => {
 *   return a.b;
 * });
 */

Context and settings

Context everywhere
Tags N/A
Recommended false
Options excludeTags

Failing examples

Passing examples