- Issue created by @pdureau
-
pdureau β
committed 427b8366 on 2.0.x
Issue #3483831 by pdureau: apply vincentlanglet/twig-cs-fixer to...
-
pdureau β
committed 427b8366 on 2.0.x
- π«π·France pdureau Paris
run the twig linter on existign codebase
Done in beta5: https://git.drupalcode.org/project/ui_patterns/-/commit/427b83660dffb549...
add the linter to our CI pipeline
Moved to RC scope.
- Merge request !298Issue #3483831 by smovs, pdureau: Adopt vincentlanglet/twig-cs-fixer for Twig coding standards β (Merged) created by SmovS
- πΊπ¦Ukraine SmovS Lutsk
Hi guys!
I added the twig linter to the CI pipeline.Please review.
- π«π·France pdureau Paris
Hi smos,
Christian will review your gitlab CI addition.
It seems you didn't run the linter on the existing UIP2 codebase, because I have this:
+++ b/tests/modules/ui_patterns_test/components/test-component/test-component.twig @@ -1,5 +1,5 @@ {% set variant = variant|default('') %} -<div{{ attributes.addClass(['ui-patterns-test-component', 'ui-patterns-test-component-variant-' ~ variant ]) }}> +<div{{ attributes.addClass(['ui-patterns-test-component', 'ui-patterns-test-component-variant-' ~ variant]) }}> <div class="ui-patterns-props-string"> {{ string }} </div>
- πΊπ¦Ukraine SmovS Lutsk
Hi pdureau,
Thank you for your feedback.
Indeed, I didn't run the linter when finished with GitLab CI. I will check it. - π«π·France just_like_good_vibes PARIS
one comment about the "with_context=false".
I knew the linter wanted to put "with_context: false", but it is written everywhere that the right code portion is "with_context=false".
so i was like confused.
what do you guys think? - πΊπ¦Ukraine SmovS Lutsk
I was also a bit confused and double-checked it on the Twig CS page. They suggest use
:
instead of=
Anyway, we can use our custom ruleset to override if necessary.Twig CS here: Link to CS
- π©πͺGermany Christian.wiedemann
I checked it right now, and it is fine for me. We use "only" . (Is it the same)
{% embed "" {param: param} only %} {% endembed %}
- π«π·France pdureau Paris
Anyway, we can use our custom ruleset to override if necessary.
No custom ruleset. Let's just follow default vincentlanglet/twig-cs-fixer without overthinking
-
pdureau β
committed f0735579 on 2.0.x authored by
smovs β
Issue #3483831 by smovs, pdureau: Adopt vincentlanglet/twig-cs-fixer for...
-
pdureau β
committed f0735579 on 2.0.x authored by
smovs β
- Status changed to Fixed
27 days ago 12:29pm 26 December 2024 Automatically closed - issue fixed for 2 weeks with no activity.