grommet / jsx-to-string

Parse your React JSX component to string
MIT License
124 stars 26 forks source link

JSX formatting #24

Closed alexandrebodin closed 7 years ago

alexandrebodin commented 7 years ago

Currently the formatting will output props in the following fashion:

<Component name='name'
  value={1}
  isOpen={true} />

Most standards (e.g prettier) would expect something more like this:

<Component
  isOpen={true}
  value={1}
  name='name'
/>

I would suggest adding a formatting option for different formatting styles and using some defaults matching most standards.

What's your opinion ? Should I work on a PR ?

alansouzati commented 7 years ago

Hey sorry for taking such a long time to reply to this. I actually like the idea of adding a formatter. Can you work on a PR for this?