Closed (fixed)
Project:
UI Suite DSFR
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Jul 2024 at 07:51 UTC
Updated:
6 Jul 2024 at 07:51 UTC
Jump to comment: Most recent
Drupal Core is planning to #3284817: Adopt vincentlanglet/twig-cs-fixer for Twig coding standards
Let's do the same in our codebase.
Before tagging 1.0.0, run vendor/bin/twig-cs-fixer lint --fix /path/to/code a first time.
Do we also need to add something somewhere (README, Makefile...)?
Comments
Comment #2
pdureau commentedGood opportunity to do those little Twig fixes too.
footer
Use `|default(foo)` filter instead of shorthand ternary `?:`
<a class="fr-footer__brand-link" href="{{ home_url|default('/') }}" title="{{ 'Homepage'|t }} - {{ operator_logo_alt ? operator_logo_alt : service_title }} - {{ logo_text }}">translate
Unused variables: html_id
Function `random()` must be used in a `default()` filter!
Comment #4
pdureau commentedComment #6
pdureau commented