@wemake-services/eslint-config-jsdoc
v2.1.1
Published
Essential rules for eslint-plugin-jsdoc
Downloads
24
Maintainers
Readme
@wemake-services/eslint-config-jsdoc
Shareable configuration for eslint-plugin-jsdoc
.
The main idea of this configuration is to be:
- Strict about syntax
- Permissive about types (because we use
flow
for type annotations) - Opened for further extensions
Installation
npm install --save-dev @wemake-services/eslint-config-jsdoc
Then, modify your eslint
configuration:
{
"extends": [
"@wemake-services/jsdoc"
]
}
Done! Later you can modify your configuration to include any extra rules you need.
Code example
This code is considered valid (and beautiful):
/**
* Imaginary function to take same slices from imaginary pizza.
* This function is created, because we love pizza.
*
* @param pizza - {Array} List of slices.
* @param numberOfSlices - Number of slices to take away.
* @returns {Array} What is left of our pizza.
*/
function takeSlices (pizza, numberOfSlices) {
return pizza.splice(0, numberOfSlices)
}
License
MIT.