Skip to content

Commit b1db67f

Browse files
Merge pull request #18 from nilshoffmann/main
Fix failure of prettier on unquoted fieldNames containing '-'
2 parents 9fcc53e + f135dd9 commit b1db67f

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)