GithubHelp home page GithubHelp logo

Comments (8)

grasmash avatar grasmash commented on August 28, 2024

Yay! I've been wanting to add this but I didn't know what tool would provide the linting.

from blt.

grasmash avatar grasmash commented on August 28, 2024

@TravisCarden I don't appear to have a vendor/bin/console despite having symfony/console as a dependency. What package version are you using?

from blt.

TravisCarden avatar TravisCarden commented on August 28, 2024

lint:twig is documented under the Templating component (symfony/templating). Perhaps it's provided separately by that? (I never implemented this. I just saw it in the documentation.)

from blt.

grasmash avatar grasmash commented on August 28, 2024

Hm. Having trouble getting that binary to show up in the bin directory. Tried requiring both symfony/templating and symfony/console.

I wonder if we need to create a custom app and register those commands. It seems like that shouldn't be necessary.

from blt.

grasmash avatar grasmash commented on August 28, 2024

Looks like this is part of symfony/symfony and is registered in https://github.com/symfony/symfony/blob/2.8/src/Symfony/Bridge/Twig/Command/LintCommand.php.

Maybe we should look at a lighter-weight solution like https://github.com/asm89/twig-lint.

from blt.

grasmash avatar grasmash commented on August 28, 2024

So, lots of Symfony learning. Firstly, Symfony has a nightly build process that creates separate packagist projects for each component via git subtree. The lint command is part of symfony/twig-bridge.

The lint command can be registered with our own blt-console bin in one of two ways:

from blt.

grasmash avatar grasmash commented on August 28, 2024

Command was added but is not yet being executed in pre-commit hook.

from blt.

grasmash avatar grasmash commented on August 28, 2024

Command currently exists in blt, ./vendor/bin/blt-console twig:lint --help

from blt.

Related Issues (20)

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.