Skip to content

Commit f135dd9

Browse files
committed
Fix failure of prettier on unquoted fieldNames containing '-'
1 parent e9edbe9 commit f135dd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/generator-lib.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function makeFieldRules(fieldName: string, definition: Definition): string {
4949
}
5050

5151
function makeField(fieldName: string, definition: Definition): string {
52-
return `${fieldName}: new FormControl(null, [${makeFieldRules(fieldName, definition)}])`;
52+
return `"${fieldName}": new FormControl(null, [${makeFieldRules(fieldName, definition)}])`;
5353
}
5454

5555
function makeFieldsBody(definition: Definition): string[] {

0 commit comments

Comments
 (0)