eslint-config-jsdoc-strict

ESLint shareable config for JSDoc-related rules.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
eslint-config-jsdoc-strict
232.0.05 years ago6 years agoMinified + gzip package size for eslint-config-jsdoc-strict in KB

Readme

eslint-config-jsdoc-strict
ESLint shareable config for JSDoc-related rules:

Latest Stable Version NPM Downloads Build Status dependencies Status
Example of valid code:
/**
 * Description must be capitalised, end with a dot, and have a trailing new line.
 *
 * @example
 * // Functions must have a `@example` declaration
 * myFunction(null, 1, true, 'hello', () => {}, {}, []);
 * // => ...
 *
 * @param {*} param - Parameters must have a type. Descriptions must be capitalised,
 * be preceded by a hyphen, and end with a dot.
 * @param {number} num - Primitive types must be lowercased.
 * @param {boolean} bool - Primitive types must be lowercased.
 * @param {string} str - Primitive types must be lowercased.
 * @param {Function} fn - Functions can also be described using `@callback`.
 * @param {Object} obj - Object.
 * @param {Array} array - Arrays can also be defined as `<TYPE>[]`. Ex: `string[]`.
 * @returns {undefined} Functions must have a return type and description.
 */
function myFunction(param, num, bool, str, fn, obj, array) {
  // ...
}

Installation

Prerequisites:
npm install --save-dev eslint-plugin-jsdoc eslint-config-jsdoc-strict

peerDependencies Status

Usage

Add this to your .eslintrc.json:
{
  "extends": [
    "... (your usual ESLint config, if any) ...",
    "jsdoc-strict"
  ]
}

Contributing

Please refer to the guidelines for contributing.
devDependencies Status

License

License
Created with npm-package-skeleton.