ux icon indicating copy to clipboard operation
ux copied to clipboard

[Site] Custom TwigCsFixer config

Open smnandre opened this issue 1 year ago • 1 comments

(will be rebased after #1947)

Answering you here @VincentLanglet (regarding https://github.com/symfony/ux/issues/1935#issuecomment-2184084659)

Would this be the "good/safe" way to go... ?

...or should we create a Standard (and just customize the demo/memory thing here) ?

smnandre avatar Jun 29 '24 23:06 smnandre

should we create a Standard

I'm not sure about a SymfonyUX standard. I tried recently to make the Symfony standard compatible with the ux components with those changes https://github.com/VincentLanglet/Twig-CS-Fixer/commit/35a824ec5c93189d983f5e95b85ab9b4f2ee59c8.

So I would say:

  • Demo folder seems specific here and should be in your config like you did
  • If some "custom" rules like BlockNameSpacingRule, IncludeFunctionRule, etc are wanted by the symfony team we can add it to the Symfony standard. Currently my main issue was that I could only add to the Twig & Symfony standard what I could find on the docs, like
    • https://twig.symfony.com/doc/3.x/coding_standards.html
    • https://symfony.com/doc/current/templates.html#template-naming
    • https://symfony.com/doc/current/best_practices.html#templates
    • https://symfony.com/bundles/ux-twig-component/current/index.html

But the goal would be to have Symfony members adding rules directly in the Symfony standard :)

VincentLanglet avatar Jun 30 '24 09:06 VincentLanglet

This looks like a nice contribution. @smnandre do you need any help form us to make this mergeable ... or is it just a matter of rebasing and then it's ready for merge? Thanks!

javiereguiluz avatar Jul 30 '24 09:07 javiereguiluz

Hi @javiereguiluz

I rebased, all seems good to me

smnandre avatar Jul 30 '24 19:07 smnandre

And it’s merged! Simon, thanks a lot for working on this. I love how we can now use consistent syntax in Twig templates effortlessly.

javiereguiluz avatar Jul 30 '24 20:07 javiereguiluz

All credits for @VincentLanglet and its great tool!

smnandre avatar Jul 30 '24 20:07 smnandre