Closed bcomnes closed 8 years ago
@bcomnes is this ok to merge as is?
Its going to start formatting JSX if this is merged, but it's probably better behavior than what goes on now. I've been super swamped at work the last two weeks 😓 I'm not ready to say yes to this yet, but if you pull it down and believe it's good, we can merge.
I did notice some frumpy formatting happens currently which is why I asked :)
No worries, I have some JSX stuff I can validate this against next week.
I'm tempted to merge this as is. I tested it out on the react tutoral repo. Results wern't qute how I wanted, but they seem in line with standard and with https://github.com/royriojas/esformatter-jsx
e.g. I would like to see something like:
return (
<div className="comment">
<h2 className="commentAuthor">
{this.props.author}
</h2>
<span dangerouslySetInnerHTML={this.rawMarkup()} />
</div>
)
but instead get
return (
<div className="comment">
<h2 className="commentAuthor">{this.props.author}</h2>
<span dangerouslySetInnerHTML={this.rawMarkup()} />
</div>
)
Any thoughts on the matter?
If it's better than what's currently happening, let's merge it.
OK, I'll merge this later today if someone else doesn't beat me to it.
@bcomnes was this merged?
In the version that I'm using (1.6.9) the indentation of the first tag is off.
render() {
return (
<div>
<h1>...</h1>
<button onClick={foo}>...</button>
<canvas ref='canvas'/>
</div>
)
}
@0x80 no not yet. I'm going to get this and the new formatter rules pulled in, do a release, then try to improve the es6 situation with the new rules this weekend.
:+1: awesome!
Actually, I'm going to do a release with the new rules first so I can do a minor release first.
Improves JSX formatting a fair amount. WIP.