[Dropzone][Toolkit] Apply Twig CS Fixer - #3654
Conversation
9342f59 to
efbff5b
Compare
|
|
||
| <div | ||
| id="{{ _dropdown_id }}" | ||
| id="{{ dropdown_id }}" |
There was a problem hiding this comment.
Please keep _ prefix for Twig variables declared inside components, these variables "overflow" in the user's templates and we want to reduce the risk of collision
| {%- props as = 'a' -%} | ||
|
|
||
| {% set attributesDefaults = {} %} | ||
| {% set attributes_defaults = {} %} |
There was a problem hiding this comment.
| {% set attributes_defaults = {} %} | |
| {% set _attributes_defaults = {} %} |
efbff5b to
91d6dee
Compare
a2f520a to
fe5ba23
Compare
|
There are no modifications on the Twig-CS-Fixer configuration file? |
6e2358b to
ce334f7
Compare
@VincentLanglet, I'd like your opinion on this. Do you need to modify https://github.com/VincentLanglet/Twig-CS-Fixer to add two rules:
Or should we modify the configuration of our I added |
The rule already has an option "optionalPrefix" we should allow you to use I'm not sure it should be change in the generic ruleset cause this seems to be a specific rule used by symfony/ux which is not recommended in the Twig coding standard.
Definetly something custom to this repo.
Yes, that's the way |
69be75f to
c1d734f
Compare
Thanks @VincentLanglet for your feedback! I've updated the
|
c1d734f to
89facc0
Compare
|
Thank you @seb-jean. |
I added
$config->allowNonFixableRules();in the.twig-cs-fixer.dist.phpfile to surface errors that aren't automatically fixable, then fixed those errors.Here is an overview of the errors: