Skip to content

Commit 0ad38c0

Browse files
committed
Add meta.schema
1 parent 182e952 commit 0ad38c0

File tree

4 files changed

+67
-2
lines changed

4 files changed

+67
-2
lines changed

src/rules/matchDescription.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,35 @@ export default iterateJsdoc(({
5151
});
5252
}, {
5353
meta: {
54+
schema: [
55+
{
56+
additionalProperties: false,
57+
properties: {
58+
matchDescription: {
59+
format: 'regex',
60+
type: 'string'
61+
},
62+
tags: {
63+
patternProperties: {
64+
'.*': {
65+
oneOf: [
66+
{
67+
format: 'regex',
68+
type: 'string'
69+
},
70+
{
71+
enum: [true],
72+
type: 'boolean'
73+
}
74+
]
75+
}
76+
},
77+
type: 'object'
78+
}
79+
},
80+
type: 'object'
81+
}
82+
],
5483
type: 'suggestion'
5584
}
5685
});

src/rules/newlineAfterDescription.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,11 @@ export default iterateJsdoc(({
5757
meta: {
5858
fixable: 'whitespace',
5959
type: 'layout'
60-
}
60+
},
61+
schema: [
62+
{
63+
enum: ['always'],
64+
type: 'string'
65+
}
66+
]
6167
});

src/rules/requireDescription.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,29 @@ export default iterateJsdoc(({
4444
contexts :
4545
[...new Set([...defaultContexts, ...contexts])];
4646
},
47+
schema: [
48+
{
49+
additionalProperties: false,
50+
properties: {
51+
contexts: {
52+
oneOf: [
53+
{
54+
items: {
55+
type: 'string'
56+
},
57+
type: 'array'
58+
},
59+
{
60+
type: 'string'
61+
}
62+
]
63+
},
64+
noDefaults: {
65+
type: 'boolean'
66+
}
67+
},
68+
type: 'object'
69+
}
70+
],
4771
type: 'suggestion'
4872
});

src/rules/requireHyphenBeforeParamDescription.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,11 @@ export default iterateJsdoc(({
4747
meta: {
4848
fixable: 'code',
4949
type: 'layout'
50-
}
50+
},
51+
schema: [
52+
{
53+
enum: ['always'],
54+
type: 'string'
55+
}
56+
]
5157
});

0 commit comments

Comments
 (0)