Open nomadtechie opened 9 years ago
Not sure I understand your issue completely but I did notice now that there is an extra space when the code is formatted. This is definitively a bug.
Hi Royriojas, thanks so much, and yes, its a bug, I'll stay posted for the updates. I would love to contribute, not sure where to get started with a beautifier library.
Hey @royriojas is there any chance to fix this bug or this is fundamental one?
not really, it is just a wrong calculation. but this will have to be a major change because some of the tests were mistakenly asserting the wrong thing.
That said, it is just lack of time that is preventing me from taking care of this particular issue.
I am still having this problem using the latest version.
<div className={theme.container}>
<AutoSizer>
{({height, width}) => {
return <ScrollSync>
{({onScroll, scrollTop}) => {
return <div>Blah</div>;
}}
</ScrollSync>
}}
</AutoSizer>
</div>
Hello Royriojas,
Thanks for this awesome plugin!
I'm not sure why an extra space is being added here where there is a return:
Before: export class Test extends React.Component {
}
After:
export class Test extends React.Component {
}
As you can see the after, I have 21 and 17, but the rest have formatterd correctly. Below is my config for this plugin: "jsx":{ "formatJSX":true, "attrsOnSameLineAsTag":true, "maxAttrsOnTag":3, "firstAttributeOnSameLine":true, "spaceInJSXExpressionContainers":"", "alignWithFirstAttribute":false, "htmlOptions":{ "brace_style":"collapse", "indent_char":" ", "indent_size":4, "max_preserve_newlines":2, "preserve_newlines":true } }