Code Monkey home page Code Monkey logo

twig-lint's Introduction

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 for Vim).

Build Status

Installation / Usage

As standalone executable

Download the twig-lint.phar executable. Or as a global composer dependency:

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

Run php twig-lint.phar lint <file> or ~/.composer/vendor/bin/twig-lint lint <file>.

As a dev dependency

Add the following to your composer.json:

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

Run ./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.phar'

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

Authors

Alexander [email protected]
Marc Weistroff [email protected] (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).

twig-lint's People

Contributors

asm89 avatar smoench avatar tolry avatar inside avatar

Stargazers

Roman avatar Vladimir Tkachev avatar Oleg Abrazhaev avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.