Package Exports
- eslint-config-jsdoc-strict
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-config-jsdoc-strict) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
eslint-config-jsdoc-strict
ESLint shareable config for JSDoc-related rules:
- ESLint require-jsdoc and valid-jsdoc rules,
- All eslint-plugin-jsdoc plugin rules.
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
Usage
Add this to your .eslintrc.json
:
{
"extends": [
"... (your usual ESLint config, if any) ...",
"jsdoc-strict"
]
}
Contributing
Please refer to the guidelines for contributing.
License
Created with npm-package-skeleton.