Skip to content

Commit 0f0ab21

Browse files
committed
Move the first option into the config object
Use the "spaces" name.
1 parent 8e547ea commit 0f0ab21

File tree

2 files changed

+80
-80
lines changed

2 files changed

+80
-80
lines changed

lib/rules/jsx-curly-spacing.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ module.exports = {
3232
fixable: 'code',
3333

3434
schema: [{
35-
enum: SPACING_VALUES
36-
}, {
3735
type: 'object',
3836
properties: {
37+
spaces: {
38+
enum: SPACING_VALUES
39+
},
3940
allowMultiline: {
4041
type: 'boolean'
4142
},
@@ -47,8 +48,7 @@ module.exports = {
4748
}
4849
}
4950
}
50-
},
51-
additionalProperties: false
51+
}
5252
}]
5353
},
5454

@@ -58,8 +58,8 @@ module.exports = {
5858
var DEFAULT_ALLOW_MULTILINE = true;
5959

6060
var sourceCode = context.getSourceCode();
61-
var baseSpacing = context.options[0] || DEFAULT_SPACING;
62-
var config = context.options[1] || {};
61+
var config = context.options[0] || {};
62+
var baseSpacing = config.spaces || DEFAULT_SPACING;
6363
var multiline = has(config, 'allowMultiline') ? config.allowMultiline : DEFAULT_ALLOW_MULTILINE;
6464
var spacingConfig = config.spacing || {};
6565
var objectLiteralSpacing = spacingConfig.objectLiterals || baseSpacing;

0 commit comments

Comments
 (0)