-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathjsdoc.js
67 lines (62 loc) · 2.06 KB
/
jsdoc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
module.exports = {
'plugins': [
'jsdoc'
],
'rules': {
// Possible Errors group
// Currently, we are using both valid-jsdoc and 'jsdoc' plugin. In the
// future we might stick to one as soon as it has all the features.
'valid-jsdoc': [
'error',
{
'matchDescription': '.+',
'prefer': {
'arg': 'param',
'argument': 'param',
'return': 'returns'
},
'preferType': {
'array': 'Array',
'Boolean': 'boolean',
'function': 'Function',
'Number': 'number',
'object': 'Object',
'String': 'string'
},
'requireParamDescription': true,
'requireReturn': true,
'requireReturnDescription': false,
'requireReturnType': true
}
],
// ES6 group rules
// JsDoc plugin rules group. The following rules are in addition to
// valid-jsdoc rule.
'jsdoc/check-param-names': 0,
'jsdoc/check-tag-names': 2,
'jsdoc/check-types': 0,
'jsdoc/tag-lines': [
'error',
'any',
{
startLines: 1,
},
],
// XXX Because the following plugin is not very smart about words which
// legitimately begin with uppercase characters mid-sentence, set it to
// warn only.
'jsdoc/require-description-complete-sentence': [
'warn',
{
abbreviations: ['i.e.', 'e.g.']
}
],
'jsdoc/require-hyphen-before-param-description': 2,
// The following 5 rules are covered by valid-jsdoc, so disable them.
'jsdoc/require-param': 0,
'jsdoc/require-param-description': 0,
'jsdoc/require-param-type': 0,
'jsdoc/require-returns-description': 0,
'jsdoc/require-returns-type': 0
}
};