v0.12.0
Important
Yet another breaking changes. See release notes or changelog before upgrading.
BREAKING CHANGES
- Option
twigPrintWidth
has been removed
I don't see any reason why we should keep the option twigPrintWidth
. Prettier provide mechanism to use different printWidth
for different file types by using override (see example below).
What to do?
Remove twigPrintWidth
from your prettier config and use override instead.
Example
# .prettierrc.yaml
- twigPrintWidth: 120
+ overrides:
+ - files: "*.twig"
+ options:
+ printWidth: 120
Features
- Add support for spread operator
Example
<twig:Component {{ ...vars }} />
{% set numbers = [1, 2, ...moreNumbers] %}
{% set ratings = {'q1': 10, 'q2': 5, ...moreRatings} %}
{{ 'Hello %s %s!'|format(...['Fabien', 'Potencier']) }}
Bugfixes
- Make sure that empty block statement will have empty line in between for consistency
Full Changelog: v0.11.1...v0.12.0