Skip to content

Commit 75fb917

Browse files
committed
Use full schema object instead of an array
1 parent 3e0a1e0 commit 75fb917

File tree

1 file changed

+33
-31
lines changed

1 file changed

+33
-31
lines changed

lib/rules/jsx-curly-spacing.js

+33-31
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = {
3131
},
3232
fixable: 'code',
3333

34-
schema: [{
34+
schema: {
3535
definitions: {
3636
basicConfig: {
3737
type: 'object',
@@ -60,41 +60,43 @@ module.exports = {
6060
}]
6161
}
6262
},
63-
64-
oneOf: [{
65-
allOf: [{
66-
$ref: '#/definitions/basicConfig'
67-
}, {
68-
type: 'object',
69-
properties: {
70-
attributes: {
71-
$ref: '#/definitions/basicConfigOrBoolean'
72-
},
73-
children: {
74-
$ref: '#/definitions/basicConfigOrBoolean'
63+
type: 'array',
64+
items: [{
65+
oneOf: [{
66+
allOf: [{
67+
$ref: '#/definitions/basicConfig'
68+
}, {
69+
type: 'object',
70+
properties: {
71+
attributes: {
72+
$ref: '#/definitions/basicConfigOrBoolean'
73+
},
74+
children: {
75+
$ref: '#/definitions/basicConfigOrBoolean'
76+
}
7577
}
76-
}
78+
}]
79+
}, {
80+
enum: SPACING_VALUES
7781
}]
7882
}, {
79-
enum: SPACING_VALUES
80-
}]
81-
}, {
82-
type: 'object',
83-
properties: {
84-
allowMultiline: {
85-
type: 'boolean'
86-
},
87-
spacing: {
88-
type: 'object',
89-
properties: {
90-
objectLiterals: {
91-
enum: SPACING_VALUES
83+
type: 'object',
84+
properties: {
85+
allowMultiline: {
86+
type: 'boolean'
87+
},
88+
spacing: {
89+
type: 'object',
90+
properties: {
91+
objectLiterals: {
92+
enum: SPACING_VALUES
93+
}
9294
}
9395
}
94-
}
95-
},
96-
additionalProperties: false
97-
}]
96+
},
97+
additionalProperties: false
98+
}]
99+
}
98100
},
99101

100102
create: function(context) {

0 commit comments

Comments
 (0)