verizonconnect / ngx-form-generator

Generate Angular ReactiveForms from OpenAPI documents
MIT License
44 stars 13 forks source link

Fix failure of prettier on unquoted fieldNames containing '-' #18

Closed nilshoffmann closed 2 years ago

nilshoffmann commented 2 years ago

Prettier fails with a SyntaxError: ',' expected when it encounters an unquoted field name in the form control. Simply quoting all field names fixes the issue. Prettier then keeps or removes the quotes automatically, as needed.

martinmcwhorter commented 2 years ago

Thanks for this.

The prettier error is probably just a symptom of the problem.