-
Notifications
You must be signed in to change notification settings - Fork 453
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
Disallow or enforce spaces inside of curly braces in objects? #802
Comments
Pretty Diff has an option for this: prettydiff.com/documentation.xhtml#bracepadding It seems the option has been poorly maintained and is currently broken though. I have already written a fix and it will be published with the next patch: prettydiff/prettydiff#266 Currently, it seems this Pretty Diff option is not supported by Atom Beautify, so I need it add it in. There is a JS Beautify option for brace-style which takes a value of |
Hi thanks for the quick reply. What is the turn around for patches like this both on your end and for it to be supported in atom-beautify? |
I typically publish resolutions to defect between an hour and two weeks depending upon the defect and what other items are in process. Atom Beautify publishes changes a bit more slowly because it has a wider distribution of dependencies and potential problem states to consider. |
+1 |
Launched in v1.16.15 of Pretty Diff 24 days ago. |
@prettydiff Brace style options do not seem to have any effect with Pretty Diff. Was this fixed? |
Should be fixed. The comment above says it was fixed with version 1.16.15 and Atom Beautify uses version 1.16.17. |
In that case I think there has been a regression either in Pretty Diff or Atom Beautify. Using Atom Beautify 0.29.11 and Pretty Diff, Brace Style settings have no effect at all I've tried using "bracepadding" in |
Correct, |
What's going on with this? |
Pull Request #1193 was merged. Published to v0.29.12 |
@Glavin001 how would I use this in my config file? I'm not seeing anything in the docs about |
@Glavin001 let me know when you get the chance! :) |
@ElegantSudo It is named |
@Glavin001 Thanks, but I'm talking about things like this: |
Any updates on this? Thanks |
waiting for this option too |
For those waiting for this option:
|
I got the import {Dimensions} from 'react-native'; into import { Dimensions } from 'react-native'; Great. However, it also applies spaces to regular parens, like function calls: Math.floor( height * 0.3 ), and even arrow functions: const test = ( ) => {} which eslint doesn't like. Is there a chance to configure beautification in a way that spaces only apply to object literals? If you're developing React with |
This idea was brought up with #286 and has since moved to #299 . I plan on developing https://github.com/Unibeautify/unibeautify-options-importer to solve this problem by adapting technologies like |
Sounds great! |
Just to confirm: |
@jordangarside You can take a look at available Javascript (and other languages) options here: https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md#javascript Looks like the closest options: Check out the docs for Unibeautify (rewrite of Atom-Beautify):
Option |
@Glavin001 the That Unibeautify option looks like what I want. 👍 Thanks! |
Unfortunately, Unibeautify is not released yet. @szeck87 is making great strides with #1935 . I recommend you subscribe to #1174 for updates to Atom-Beautify. Also, please star and/or watch https://github.com/Unibeautify/unibeautify for updates for Unibeautify. Thank you for your interest!! |
If I am not mistaken, the original goal of this issue was to add support for Pretty Diff has a |
Thanks for the info @Glavin001 ! For the time being I just ended up going with Prettier. |
@szeck87 is working on adding Prettier support to Atom-Beautify as part of #1497 |
A lot of the linting configs i have tried use a 1 char space at the beginning and end within objects. Would be great if we were able to get this simple setting.
I use eslint with eslint-config-airbnb and this is the most frequent issue I have when attempting to beatify my code.
http://eslint.org/docs/rules/object-curly-spacing
Thanks
The text was updated successfully, but these errors were encountered: