File tree Expand file tree Collapse file tree 2 files changed +40
-3
lines changed Expand file tree Collapse file tree 2 files changed +40
-3
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,11 @@ module.exports = {
8787 case 'properties' : {
8888 hadChildren = true ;
8989
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+ }
9395 }
9496 }
9597
Original file line number Diff line number Diff line change @@ -145,6 +145,41 @@ module.exports = {
145145 create() {}
146146};
147147` ,
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+ ` ,
148183 ] ,
149184
150185 invalid : [
You can’t perform that action at this time.
0 commit comments