Skip to content

Commit

Permalink
Use full schema object instead of an array
Browse files Browse the repository at this point in the history
  • Loading branch information
jseminck committed Jul 9, 2017
1 parent 3e0a1e0 commit 75fb917
Showing 1 changed file with 33 additions and 31 deletions.
64 changes: 33 additions & 31 deletions lib/rules/jsx-curly-spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
},
fixable: 'code',

schema: [{
schema: {
definitions: {
basicConfig: {
type: 'object',
Expand Down Expand Up @@ -60,41 +60,43 @@ module.exports = {
}]
}
},

oneOf: [{
allOf: [{
$ref: '#/definitions/basicConfig'
}, {
type: 'object',
properties: {
attributes: {
$ref: '#/definitions/basicConfigOrBoolean'
},
children: {
$ref: '#/definitions/basicConfigOrBoolean'
type: 'array',
items: [{
oneOf: [{
allOf: [{
$ref: '#/definitions/basicConfig'
}, {
type: 'object',
properties: {
attributes: {
$ref: '#/definitions/basicConfigOrBoolean'
},
children: {
$ref: '#/definitions/basicConfigOrBoolean'
}
}
}
}]
}, {
enum: SPACING_VALUES
}]
}, {
enum: SPACING_VALUES
}]
}, {
type: 'object',
properties: {
allowMultiline: {
type: 'boolean'
},
spacing: {
type: 'object',
properties: {
objectLiterals: {
enum: SPACING_VALUES
type: 'object',
properties: {
allowMultiline: {
type: 'boolean'
},
spacing: {
type: 'object',
properties: {
objectLiterals: {
enum: SPACING_VALUES
}
}
}
}
},
additionalProperties: false
}]
},
additionalProperties: false
}]
}
},

create: function(context) {
Expand Down

0 comments on commit 75fb917

Please sign in to comment.