-
Notifications
You must be signed in to change notification settings - Fork 0
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
Examples or description of the behavior #3
Comments
Hi again @oyeanuj. Hope you're doing great. Thanks a lot for your interest on Righteous. Righteous is designed to handle my custom coding style. This is just a random example. You can read a bit about this coding style here Before you run it on any serious code please be warned that righteous is designed for my own specific projects and DEFINITELY EXPERIMENTAL AND NOT READY FOR ANY KIND OF REAL WORLD PROJECTS. TypeScript / JavaScript it will look like this: But formatters scan the code and then rewrite it with from the AST level so in TypeScript / JavaScript only whitespace and indentations are being formatted. In CSS almost everything get's formatted, the lines are sorted and formatted in table views, extra lines are removed and similar stuff. |
@pmkary Thank you for the detailed response, it definitely looks clean and readable! Since it isn't ready for real-world use yet, I will try to use it some test project. Looking forward to it being ready for real world use :) PS. How much flexibility do you foresee providing? Would it be like Eslint/Prettier that there would be some opt-in/opt-out rules for formatting? |
You're welcome! Righteous is not a good thing to be used for any projects. It is stable on TypeScript / JavaScript because it uses TypeScript's internal formatting engine so it is stable. The only place it breaks apart is identifying my comments. Also when it comes to CSS the whole thing happens by rewriting the code from the tree. The problem is I develop them as I progress in my other projects so there are so many CSS stuff that I haven't used and so I haven't wrote the formatter for them (just recently I found it cann't format To your question. In typescript spaces are formatted but the rest of the stuff are still optional by many means. In CSS however almost everything is formatted expect for the property values. Because in CSS there are no grammars for them and I have to develop another parser for them which is really time consuming so I have left them manul |
Got it, that makes sense! Thanks for the context! |
Hi @pmkary, I came here via your themes. I was curious if you have any before/after examples or description of how Righteous behaves, so that one knows what to expect by installing this?
The text was updated successfully, but these errors were encountered: