wotnak/twig-cs-fixer-drupal

Drupal specific rules for Twig CS Fixer.

2.0.0 2024-08-25 13:10 UTC

This package is auto-updated.

Last update: 2025-03-25 15:24:21 UTC


README

Drupal specific config for Twig CS Fixer.

Installation

  • Install Twig CS Fixer

  • composer req --dev wotnak/twig-cs-fixer-drupal

  • In your Twig CS Fixer configuration file enable predefined Drupal specific config:

    <?php
    // Load Drupal TwigCsFixer configuration.
    return \TwigCsFixerDrupal\DrupalConfig::getConfig();

Custom rules

Rule Fixable Description
RequireComponentAttributesRule no Ensures that main html tag of a component has attributes set using attributes prop.