Added flowCommaSeparator option for object types (#3547)
This commit is contained in:
@@ -274,7 +274,11 @@ export function ObjectTypeAnnotation(node: Object) {
|
||||
statement: true,
|
||||
iterator: () => {
|
||||
if (props.length !== 1) {
|
||||
this.semicolon();
|
||||
if (this.format.flowCommaSeparator) {
|
||||
this.token(",");
|
||||
} else {
|
||||
this.semicolon();
|
||||
}
|
||||
this.space();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,8 @@ function normalizeOptions(code, opts, tokens): Format {
|
||||
adjustMultilineComment: true,
|
||||
style: style,
|
||||
base: 0
|
||||
}
|
||||
},
|
||||
flowCommaSeparator: opts.flowCommaSeparator,
|
||||
};
|
||||
|
||||
if (format.minified) {
|
||||
|
||||
Reference in New Issue
Block a user