asm89 / twig-lint
Standalone twig linter.
Installs: 3 745 377
Dependents: 4
Suggesters: 1
Security: 0
Stars: 118
Watchers: 6
Forks: 32
Open Issues: 13
Requires
- symfony/console: ^2.1 || ^3.0 ||^4.0
- symfony/finder: ^2.1 || ^3.0 ||^4.0
- twig/twig: ^1.16.2
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-10-26 17:40:17 UTC
README
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 for Vim).
Installation / Usage
As a dev dependency (recommended)
Add the following to your composer.json
:
{ "require-dev": { "asm89/twig-lint": "*" } }
Run ./bin/twig-lint lint <file>
.
As standalone executable
Install as a global composer dependency:
composer global require "asm89/twig-lint" "@stable"
Run ~/.composer/vendor/bin/twig-lint lint <file>
.
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
Alexander iam.asm89@gmail.com
Marc Weistroff marc.weistroff@sensiolabs.com (creator of the original twig:lint
command in the symfony framework)
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).