File tree Expand file tree Collapse file tree 2 files changed +80
-80
lines changed Expand file tree Collapse file tree 2 files changed +80
-80
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,11 @@ module.exports = {
32
32
fixable : 'code' ,
33
33
34
34
schema : [ {
35
- enum : SPACING_VALUES
36
- } , {
37
35
type : 'object' ,
38
36
properties : {
37
+ spaces : {
38
+ enum : SPACING_VALUES
39
+ } ,
39
40
allowMultiline : {
40
41
type : 'boolean'
41
42
} ,
@@ -47,8 +48,7 @@ module.exports = {
47
48
}
48
49
}
49
50
}
50
- } ,
51
- additionalProperties : false
51
+ }
52
52
} ]
53
53
} ,
54
54
@@ -58,8 +58,8 @@ module.exports = {
58
58
var DEFAULT_ALLOW_MULTILINE = true ;
59
59
60
60
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 ;
63
63
var multiline = has ( config , 'allowMultiline' ) ? config . allowMultiline : DEFAULT_ALLOW_MULTILINE ;
64
64
var spacingConfig = config . spacing || { } ;
65
65
var objectLiteralSpacing = spacingConfig . objectLiterals || baseSpacing ;
You can’t perform that action at this time.
0 commit comments