-
Notifications
You must be signed in to change notification settings - Fork 15
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
Consider updating automated code formatting tools' rules #924
Comments
Possibly related question - should |
Thanks for starting this discussion @howard-e ! I have wanted this for a while. We are deeply nested in many places and the default printWidth is frequently chopping up our code. I do think this is partially an invitation to nest our code less (smaller components, dedicated functions, not nesting conditionals where possible) but there is a lot of code that we won't be refactoring anytime soon that would have increased readability from a higher |
Great idea! Could I suggest we use Also to improve git diffs I was wondering if we could use |
Thanks for starting this discussion, @howard-e. My comment is an outlier among the three that you've referenced in that I was looking for guidance on the reduction of line length. Prettier's "printWidth" feature won't help us in that case as it tolerates string literals of any size. For what it's worth, I'm in favor of a strongly-enforced conventional maximum line length for the reasons that @stalgiag cited above. If the only hesitation to adopting such a policy is the existence of non-conforming code, I recommend making exceptions with in-line comments as necessary, both as a stop-gap for future contributions and as an explicit marker of intent for future refactoring. |
I think I agree with what @jugglinmike is proposing here as I do think there is useful accountability in the Going off @alflennik's, I would be in support of maintaining the default Prettier |
A follow up on this is to create a PR which updates the project's default Additional consideration for updating the |
printWidth
Currently, the auto-formatting tools uses prettier's default
printWidth
rule which defaults to80
. As the project grows and there are more deeply nested branches in the code, contributors have raised concerns or questions when it comes to readability (and perhaps ease of maintainability in some cases):hashTests
function to support the migration of test results across test plan versions using the v2 test format #880 (comment)Generally, this discussion is a matter of "personal taste", but it seems the currently active contributors on this project align on increasing this number for practical readability reasons. Is there a reason to not to do this? What should it be increased to?
The text was updated successfully, but these errors were encountered: