Open MangelMaxime opened 7 months ago
@MangelMaxime Please exclude the src/fcs-fable
folder, as it needs to retain the original formatting from upstream.
@ncave I will make sure to ignore that folder 👍
I want to pick this one up, what do you want to do with the existing settings: https://github.com/fable-compiler/Fable/blob/2184f8515f5d1042de4a16ce205396d9949686e4/.editorconfig#L13-L17
@nojaf It looks like the old setting is a subset of the one I proposed.
So for me, I am in favour of replacing them we what I proposed but obviously I am biased ^^.
To explains the motivations of my setting is that I try to have a code formatting which is consistent independently from the numbers of elements. If the array/record/member has 1, 2 or 10 arguments I prefer to have it formatted in the same way.
The implementation I had in mind is to have the CI check if the code is formatted correctly. I don't know if all the tools allows that but I know that fantomas does.
And also, try to leverage git hooks to auto format the code on commits. Like that this is something we can "forget" about as it is done automatically.
@nojaf It looks like the old setting is a subset of the one I proposed.
Well, it has fsharp_multiline_bracket_style = stroustrup
and you are proposing aligned
.
Which one do you want to go with?
Oh my bad, I missed that difference.
Now I questioning my whole life as I always though I was using stroustrup
, let's go with aglined
as you did in the PR
It would be nice to have auto formatting of the code so we can unify the styling in the project.
For F# we can use Fantomas
Here is a setting configuration that I often use
For Python, we can use
ruff