Skip to content
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.

[Question] How does this relate with rufo? #1

Closed
acnovais opened this issue Mar 8, 2018 · 2 comments
Closed

[Question] How does this relate with rufo? #1

acnovais opened this issue Mar 8, 2018 · 2 comments

Comments

@acnovais
Copy link

acnovais commented Mar 8, 2018

Hi there,
This is pretty cool stuff.
I am considering applying a more opinionated formatter (aka no rubocop) on a ruby codebase and by being a user of prettier on JS land I came across this plugin. But I also came across with https://github.com/ruby-formatter/rufo.
Could you give me some insight on the direction of this project and why using prettier with a ruby plugin would be a better approach?
I'm thinking that it may be a bit strange to manage different language package managers on ruby project or are you thinking on a different approach?

Thanks!

@acnovais acnovais changed the title How does this relate with rufo? [Question] How does this relate with rufo? Mar 8, 2018
@iamsolankiamit
Copy link
Owner

Hey @acnovais, Rufo is cool. I didn't know about it before, but after checking it out, I still feel that I should go ahead with prettier-ruby.
What I don't like about Rufo is that it allows custom indentation for each user, as in I can format my arrays into a multi-line array, and Rufo will be fine with it, even if it fits properly in one line and multi-line was unnecessary. This way the repo will have different formatting based each users preferences.
What I like about Rufo is that it is completely in Ruby, which can be useful where having multiple language dependencies is not possible.

As for Prettier-Ruby, the Idea is to get a working version out fast, and then iterate over things which come secondary, like:

  • Having custom Ast-processor, to remove dependencies on multiple gems, and to generate JSON directly when parsing rather than after.
  • Improving support for multiple versions.
  • Possibly move from JS to Ruby completely (If a lot of people want that).

Let me know if you have any more questions, Ideas, etc.

@acnovais
Copy link
Author

Awesome, thanks for you insights! 🙏

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants