Skip to content

Commit 69b1b51

Browse files
committed
Re-enable sort-keys property style; re-order keys to comply
1 parent 54d063d commit 69b1b51

File tree

1 file changed

+24
-29
lines changed

1 file changed

+24
-29
lines changed

src/rules/requireJsdoc.js

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
// The requireJDDoc rule at eslint is deprecated and won't get any bugfixes anymore.
22
// Thus this method implements a compatible requireJSDoc rule.
33

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-
84
const OPTIONS_SCHEMA = {
9-
type: 'object',
105
additionalProperties: false,
116
properties: {
127
require: {
13-
type: 'object',
14-
default: {},
158
additionalProperties: false,
9+
default: {},
1610
properties: {
1711
ArrowFunctionExpression: {
1812
default: false,
@@ -34,9 +28,11 @@ const OPTIONS_SCHEMA = {
3428
default: false,
3529
type: 'boolean'
3630
}
37-
}
31+
},
32+
type: 'object'
3833
}
39-
}
34+
},
35+
type: 'object'
4036
};
4137

4238
const getOption = (context, key) => {
@@ -79,26 +75,6 @@ const checkJsDoc = (context, node) => {
7975
};
8076

8177
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-
10278
/**
10379
* The entrypoint for the JSDoc rule.
10480
*
@@ -160,5 +136,24 @@ export default {
160136
}
161137
}
162138
};
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'
163158
}
164159
};

0 commit comments

Comments
 (0)