twing
twing copied to clipboard
Support for linting twig templates
I would very much like to use twing to also run linting tasks on twig templates from within a webpack build. The project I want to package will contain the twig templates for downstream usage, but I want to prevent shipping faulty templates.
Being able to just parse the templates and report errors would be very helpful for the library to be used as a dependency in just linting tasks (read: webpack/gulp/... plugins).
Maybe you can use TwingParser for this purpose? It actually does what you need: parse the template to an AST tree.