-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsdoc.js
119 lines (118 loc) · 3.39 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/**
* @license Codistica
*
* Copyright (c) 2020, Codistica and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
*/
module.exports = {
plugins: ['jsdoc'],
extends: [
'plugin:jsdoc/recommended'
],
rules: {
'jsdoc/valid-types': 'error',
'jsdoc/no-undefined-types': 'error',
'jsdoc/check-indentation': 'warn',
'jsdoc/check-tag-names': [
'error',
{
definedTags: ['flow']
}
],
'jsdoc/check-param-names': 'error',
'jsdoc/check-property-names': 'error',
'jsdoc/require-jsdoc': [
'warn',
{
require: {
ArrowFunctionExpression: true,
ClassDeclaration: true,
ClassExpression: true,
FunctionDeclaration: true,
FunctionExpression: true,
MethodDefinition: true
},
exemptEmptyFunctions: false
}
],
'jsdoc/require-description': [
'warn',
{
descriptionStyle: 'tag',
exemptedBy: [
'see',
'todo',
'type',
'typedef',
'callback',
'constant',
'module',
'namespace',
'classdesc',
'flow'
],
contexts: ['any']
}
],
'jsdoc/require-description-complete-sentence': [
'warn',
{
tags: ['description']
}
],
'jsdoc/require-property': 'warn',
'jsdoc/require-property-name': 'warn',
'jsdoc/require-property-type': 'warn',
'jsdoc/require-property-description': 'warn',
'jsdoc/require-hyphen-before-param-description': [
'warn',
'always',
{
tags: {
property: 'always'
}
}
],
'jsdoc/require-param': [
'warn',
{
exemptedBy: ['see']
}
],
'jsdoc/require-param-name': ['error', {contexts: ['any']}],
'jsdoc/require-param-type': ['error', {contexts: ['any']}],
'jsdoc/require-param-description': ['warn', {contexts: ['any']}],
'jsdoc/require-returns': [
'warn',
{
exemptedBy: ['see'],
forceRequireReturn: true,
forceReturnsWithAsync: true,
contexts: ['any']
}
],
'jsdoc/require-returns-type': ['error', {contexts: ['any']}],
'jsdoc/require-returns-description': ['warn', {contexts: ['any']}],
},
settings: {
jsdoc: {
mode: 'jsdoc',
tagNamePreference: {
returns: 'returns',
property: 'property',
param: 'param',
augments: 'extends',
description: 'description',
function: 'function'
},
overrideReplacesDocs: false,
preferredTypes: {
object: 'Object'
},
ignorePrivate: true
}
}
};