Hi,
For me, trailing commas feature is surely useful and the main advantage for
me is to have a smaller diff on code reviews.
For TS this is the tslint rule I use:
"trailing-comma": [true, {"multiline": "always", "singleline": "never"}],
basically stating that if the list is multi line, it is enforced while on
single line is denied.
AFAIK, PSR-12 currently does not have any rule for trailing comma in any
place that it could be used and, IMO, it should be kept like this, to allow
both your and my styles.
Regards,
Alex
On Wed, Apr 29, 2020 at 12:20 PM tag Knife <[email protected]> wrote:
> Since the RFC to allow this behavour in PHP 8 has been accepted, I wish to
> start talks on if we should amend PSR-12 to allow or disallow trailing
> commas in function and method names.
>
> There is general confusion within the community why this RFC has been
> firstly proposed and mostly accepted. With others welcoming the change as
> they apparently do this error all the time.
>
> Personally I have never had a problem with accedently trailing a comma in
> parameter lists and against this RFC, I think it promotes learned bad
> habits instead of allowing people to learn from mistakes.
> I am for disallowing trailing commas in parameter lists in either PSR-12
> or any future code style.
>
> Discuss.
>
> RFC: https://wiki.php.net/rfc/trailing_comma_in_parameter_list
>
> --
> You received this message because you are subscribed to the Google Groups
> "PHP Framework Interoperability Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/php-fig/345a4919-6a2e-47c3-a932-c2f12d312f07%40googlegroups.com
> <https://groups.google.com/d/msgid/php-fig/345a4919-6a2e-47c3-a932-c2f12d312f07%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups "PHP
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/CAAwdEzBx-2sSANs667juLGvS-W91c04ZfMLqUk03iTKTArwhCQ%40mail.gmail.com.