File tree 2 files changed +40
-3
lines changed
2 files changed +40
-3
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,11 @@ module.exports = {
87
87
case 'properties' : {
88
88
hadChildren = true ;
89
89
90
- for ( const property of value . properties ) {
91
- if ( property . value ?. type === 'ObjectExpression' ) {
92
- checkSchemaElement ( property . value ) ;
90
+ if ( Array . isArray ( value . properties ) ) {
91
+ for ( const property of value . properties ) {
92
+ if ( property . value ?. type === 'ObjectExpression' ) {
93
+ checkSchemaElement ( property . value ) ;
94
+ }
93
95
}
94
96
}
95
97
Original file line number Diff line number Diff line change @@ -145,6 +145,41 @@ module.exports = {
145
145
create() {}
146
146
};
147
147
` ,
148
+ `
149
+ module.exports = {
150
+ meta: {
151
+ schema: [
152
+ {
153
+ type: 'object',
154
+ properties: null,
155
+ additionalProperties: false
156
+ }
157
+ ],
158
+ },
159
+ create() {}
160
+ }
161
+ ` ,
162
+ `
163
+ const DEFAULT_OPTIONS = Object.freeze({});
164
+
165
+ module.exports = {
166
+ meta: {
167
+ schema: [
168
+ {
169
+ type: 'object',
170
+ properties: Object.fromEntries(
171
+ Object.keys(DEFAULT_OPTIONS).map((code) => [
172
+ code,
173
+ { type: 'boolean' }
174
+ ])
175
+ ),
176
+ additionalProperties: false
177
+ }
178
+ ],
179
+ },
180
+ create() {}
181
+ }
182
+ ` ,
148
183
] ,
149
184
150
185
invalid : [
You can’t perform that action at this time.
0 commit comments