-
-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something wrong with spaces between curly braces #440
Comments
Hello, I have just faced this problem as well, and found the solution. Sadly, XO infers rules from prettier in a way that I don't think is correct. From readme:
Instead of using prettier defaults, XO has basically overwritten some of them. So you have to update your prettier config, adding {
"printWidth": 80,
"useTabs": false,
"semi": true,
"singleQuote": true,
+ "bracketSpacing": true,
"trailingComma": "all"
} |
Thanks for sharing the solution. I opted to configure eslint + prettier manually for this specific project but next time I'Il try it again. |
When
xo
is executed, for some reason, it thinks all curly braces shouldn't have spaces and it can't fix the code even if there is nothing to fix. If I remove the spaces, it complain about theobject-curly-spacing
rule, and if I add the spaces (prettier already add them automatically on save), it still fails. Anyone knows why this is happening?The text was updated successfully, but these errors were encountered: