9ed92faaca
As part of the [Javascript Inline Docs Initiative](https://make.wordpress.org/core/handbook/docs/inline/js/) this add some tooling to lint Javascript docblocks. Two new commands: * `npm run lint:jsdoc` * `npm run lint:jsdoc:fix` The latter will run the linter and try to fix an possible issues automatically. Fixes #43828. Props netweb, atimmer, kamataryo, whyisjake. git-svn-id: https://develop.svn.wordpress.org/trunk@48650 602fd350-edb4-49c9-b593-d223f7449a82
30 lines
546 B
JavaScript
30 lines
546 B
JavaScript
module.exports = {
|
|
rules: {
|
|
'require-jsdoc': 'off',
|
|
'valid-jsdoc': [ 'error', {
|
|
prefer: {
|
|
arg: 'param',
|
|
argument: 'param',
|
|
extends: 'augments',
|
|
returns: 'return',
|
|
},
|
|
preferType: {
|
|
array: 'Array',
|
|
bool: 'boolean',
|
|
Boolean: 'boolean',
|
|
float: 'number',
|
|
Float: 'number',
|
|
int: 'number',
|
|
integer: 'number',
|
|
Integer: 'number',
|
|
Number: 'number',
|
|
object: 'Object',
|
|
String: 'string',
|
|
Void: 'void',
|
|
},
|
|
requireParamDescription: false,
|
|
requireReturn: false,
|
|
} ],
|
|
},
|
|
};
|