twing icon indicating copy to clipboard operation
twing copied to clipboard

Support for linting twig templates

Open ringods opened this issue 5 years ago • 1 comments

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

ringods avatar Mar 27 '20 19:03 ringods

Maybe you can use TwingParser for this purpose? It actually does what you need: parse the template to an AST tree.

ericmorand avatar Apr 18 '20 18:04 ericmorand