PHPackages                             asm89/twig-lint - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. asm89/twig-lint

ActiveLibrary[Templating &amp; Views](/categories/templating)

asm89/twig-lint
===============

Standalone twig linter.

1.0.3(4y ago)1186.0M—4.7%32[12 issues](https://github.com/asm89/twig-lint/issues)[2 PRs](https://github.com/asm89/twig-lint/pulls)2MITPHP

Since May 31Pushed 4y ago4 watchersCompare

[ Source](https://github.com/asm89/twig-lint)[ Packagist](https://packagist.org/packages/asm89/twig-lint)[ Docs](https://github.com/asm89/twig-lint)[ RSS](/packages/asm89-twig-lint/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (5)Used By (2)

twig-lint - Standalone twig linter
==================================

[](#twig-lint---standalone-twig-linter)

twig-lint is a lint tool for your twig files.

It can be useful to integrate in your ci setup or as the basis of editor plugins (e.g. [syntastic](https://github.com/scrooloose/syntastic) for Vim).

[![Build Status](https://camo.githubusercontent.com/430161c398ebd24d3ca21c42a01285bbc7f77fee1caa291b0c167d75c36c0099/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f61736d38392f747769672d6c696e742e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/asm89/twig-lint)

Installation / Usage
--------------------

[](#installation--usage)

### As a dev dependency (recommended)

[](#as-a-dev-dependency-recommended)

Add the following to your `composer.json`:

```
{
    "require-dev": {
        "asm89/twig-lint": "*"
    }
}
```

Run `./bin/twig-lint lint `.

### As standalone executable

[](#as-standalone-executable)

Install as a global composer dependency:

```
composer global require "asm89/twig-lint" "@stable"
```

Run `~/.composer/vendor/bin/twig-lint lint `.

### Vim and Syntastic configuration

[](#vim-and-syntastic-configuration)

For the standalone executable, add the following to your `~/.vimrc` file:

```
let g:syntastic_twig_twiglint_exec = 'php'
let g:syntastic_twig_twiglint_exe = 'php /path/to/twig-lint'
```

For the composer dependency, twig-lint must be in your `$PATH`, no further configuration is needed.

Authors
-------

[](#authors)

Alexander
Marc Weistroff  (creator of the original `twig:lint` command in the symfony framework)

License
-------

[](#license)

- twig-lint is licensed under the MIT License - see the LICENSE file for details
- I am providing code in this repository to you under an open source license. Because this is my personal repository, the license you receive to my code is from me and not from my employer (Facebook).

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity61

Solid adoption and visibility

Community24

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~881 days

Total

4

Last Release

1726d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78fcc60c1d576c1f19a4c03297931f879354efbb7e054318ffe391a2a2f0a274?d=identicon)[asm89](/maintainers/asm89)

---

Top Contributors

[![asm89](https://avatars.githubusercontent.com/u/657357?v=4)](https://github.com/asm89 "asm89 (24 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (4 commits)")[![bronzehedwick](https://avatars.githubusercontent.com/u/637174?v=4)](https://github.com/bronzehedwick "bronzehedwick (1 commits)")[![inside](https://avatars.githubusercontent.com/u/107884?v=4)](https://github.com/inside "inside (1 commits)")[![smoench](https://avatars.githubusercontent.com/u/183530?v=4)](https://github.com/smoench "smoench (1 commits)")[![tolry](https://avatars.githubusercontent.com/u/259744?v=4)](https://github.com/tolry "tolry (1 commits)")

---

Tags

twiglint

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/asm89-twig-lint/health.svg)

```
[![Health](https://phpackages.com/badges/asm89-twig-lint/health.svg)](https://phpackages.com/packages/asm89-twig-lint)
```

###  Alternatives

[twig/extra-bundle

A Symfony bundle for extra Twig extensions

91492.0M315](/packages/twig-extra-bundle)[twig/intl-extra

A Twig extension for Intl

36763.2M221](/packages/twig-intl-extra)[twig/string-extra

A Twig extension for Symfony String

22046.0M133](/packages/twig-string-extra)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

22918.5M55](/packages/twig-cssinliner-extra)[symfony/ux-twig-component

Twig components for Symfony

21914.8M162](/packages/symfony-ux-twig-component)[twig/markdown-extra

A Twig extension for Markdown

12114.3M83](/packages/twig-markdown-extra)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
