1
1
// The requireJDDoc rule at eslint is deprecated and won't get any bugfixes anymore.
2
2
// Thus this method implements a compatible requireJSDoc rule.
3
3
4
- /* eslint-disable sort-keys */
5
- /* The meta information is well defined and has a fixed structure.
6
- Sorting the keys destroys this natural structure. */
7
-
8
4
const OPTIONS_SCHEMA = {
9
- type : 'object' ,
10
5
additionalProperties : false ,
11
6
properties : {
12
7
require : {
13
- type : 'object' ,
14
- default : { } ,
15
8
additionalProperties : false ,
9
+ default : { } ,
16
10
properties : {
17
11
ArrowFunctionExpression : {
18
12
default : false ,
@@ -34,9 +28,11 @@ const OPTIONS_SCHEMA = {
34
28
default : false ,
35
29
type : 'boolean'
36
30
}
37
- }
31
+ } ,
32
+ type : 'object'
38
33
}
39
- }
34
+ } ,
35
+ type : 'object'
40
36
} ;
41
37
42
38
const getOption = ( context , key ) => {
@@ -79,26 +75,6 @@ const checkJsDoc = (context, node) => {
79
75
} ;
80
76
81
77
export default {
82
-
83
- meta : {
84
- type : 'suggestion' ,
85
-
86
- doc : {
87
- description : 'Require JSDoc comments' ,
88
- category : 'Stylistic Issues' ,
89
- recommended : 'true' ,
90
- url : 'https://github.com/gajus/eslint-plugin-jsdoc'
91
- } ,
92
-
93
- schema : [
94
- OPTIONS_SCHEMA
95
- ] ,
96
-
97
- messages : {
98
- missingJsDoc : 'Missing JSDoc comment.'
99
- }
100
- } ,
101
-
102
78
/**
103
79
* The entrypoint for the JSDoc rule.
104
80
*
@@ -160,5 +136,24 @@ export default {
160
136
}
161
137
}
162
138
} ;
139
+ } ,
140
+
141
+ meta : {
142
+ doc : {
143
+ category : 'Stylistic Issues' ,
144
+ description : 'Require JSDoc comments' ,
145
+ recommended : 'true' ,
146
+ url : 'https://github.com/gajus/eslint-plugin-jsdoc'
147
+ } ,
148
+
149
+ messages : {
150
+ missingJsDoc : 'Missing JSDoc comment.'
151
+ } ,
152
+
153
+ schema : [
154
+ OPTIONS_SCHEMA
155
+ ] ,
156
+
157
+ type : 'suggestion'
163
158
}
164
159
} ;
0 commit comments