Consistent Code Formatting of Source Code #719
Replies: 12 comments
-
me opens the gate |
Beta Was this translation helpful? Give feedback.
-
OMG, you said the bad words, @texttechne => semicolons! => 🏃 => @vobu will find you ... 🤣 Till now, we loved the anarchy in our repository and we believe in being the better formatters... 😄 But recently also @vobu added I am open to discuss - but honestly, I am not a real fan of it... Maybe I just need some time to look into them and play around with them so they already do what I want and not try to correct me always. It is nothing worse than a prettier which adopts my lovely formatted code... 🤣 |
Beta Was this translation helpful? Give feedback.
-
hell yeah, i will find you 🤣✌️ |
Beta Was this translation helpful? Give feedback.
-
da habe ich ja ein Faß aufgemacht 🤣 Ok, I should have asked before assuming. I did see chaos, but actually only package
So instead of defining a I've prepared a PR for this setup, so that you can toy around with it. Arguing for PrettierTo be honest: I'm opinionated about code formatting. So let me argue for the use of prettier just this once. Afterwards I shut up and troll my way... The best thing about prettier: it's opinionated! 😁 The tooling integration is superb! Any IDE knows how to use prettier (install a plugin once), while the minimal configuration for the essential questions (semicolon or not 😉) resides in the project. In the end its just a npm dev-dependency and can be executed by command line => completely automatable (CI/CD). In conclusion: With prettier, editorconfig & lint-staged we are able to completely automate code formatting. And since this is a build-tooling repo: Let's automate whatever is possible to save time & preclude mistakes / errors. |
Beta Was this translation helpful? Give feedback.
-
amen to that. |
Beta Was this translation helpful? Give feedback.
-
@vobu are there any concrete plans for this? I'm asking because I also have something like this on my to-do list. But I'm thinking about a specific prettier plugin that also correctly formats XML bindings... probably not that easy as the UI5 BindingParser is probably not usable for this. |
Beta Was this translation helpful? Give feedback.
-
@lennart-m it's just XML, isn't it? |
Beta Was this translation helpful? Give feedback.
-
@texttechne well, for the XML part it should be okay to use plugin-xml, though I'm not very satisfied with the indentation produced by this plugin; it seems quite random. |
Beta Was this translation helpful? Give feedback.
-
just publicly FYI: no timeline (and currently also no plans as in "to do", "steps", ...) yet. |
Beta Was this translation helpful? Give feedback.
-
@texttechne - as a first step I will go ahead with the |
Beta Was this translation helpful? Give feedback.
-
Coverted into a discussion - as this is more the nature of this topic now. The |
Beta Was this translation helpful? Give feedback.
-
Prettier is used int the repo since quite a while - closing discussion |
Beta Was this translation helpful? Give feedback.
-
Hi,
having written the first PR, I must confess, that I've had problems to conform to the different code styles of the different packages.
Hence I would like to propose the following changes:
Most likely, you know about all this & haven't had the time, so think of this issue as a friendly reminder 😄
Beta Was this translation helpful? Give feedback.
All reactions