JSDoc specific linting rules for ESLint. Install ESLint either locally or globally. Rules may, as per the ESLint user guide, have their own individual options. In eslint-plugin-jsdoc, a few options, such as, exemptedBy and contexts, may be used across different rules. eslint-plugin-jsdoc options, if present, are generally in the form of an object supplied as the second argument in an array after the error level (any exceptions to this format are explained within that rule's docs). One can use minLines and maxLines to indicate how many line breaks (if any) will be checked to find a jsdoc comment block before the given code block. These settings default to 0 and 1 respectively. In conjunction with the require-jsdoc rule, these settings can be enforced so as to report problems if a jsdoc block is not found within the specified boundaries. The settings are also used in the fixer to determine how many line breaks to add when a block is missing.
Features
- Install ESLint either locally or globally
- If you have installed ESLint globally, you have to install JSDoc plugin globally too
- Add plugins section to .eslintrc.* and specify eslint-plugin-jsdoc as a plugin
- Enable all of the rules that you would like to use
- You can selectively add to or override the recommended rules
- Rules may, as per the ESLint user guide, have their own individual options