Enforce Twig coding standards with automatic linting

Linters like twigcs keep code more consistent and readable

Status
accepted
Date
Contributors
Andrew Berry, Chris DeLuca, Hawkeye Tenderwolf, Nikki Flores
Topics
twig drupal front-end

Decision

Use the official Twig coding standards for all Twig files.

Enforce these standards with Twig-CS-Fixer. For Drupal projects, add Twig-CS-Fixer-Drupal.

Consequences

Twig files are easier to read by more people by following widely accepted code conventions.

Search Decisions