thibaudcolas / curlylint

Experimental HTML templates linting for Jinja, Nunjucks, Django templates, Twig, Liquid
https://www.curlylint.org/
MIT License
239 stars 25 forks source link

Support Alpine.js syntax #140

Open Alex3917 opened 2 years ago

Alex3917 commented 2 years ago

I have Django templates I would like to lint, but cannot because they incorporate Alpine.js events.

The linter is throwing a parse error, because it doesn't support attributes starting with @, which Alpine.js uses for events like @click. To support Alpine.js, html attributes starting with @ would have to be recognized as valid.

jkaeske commented 1 year ago

Currently facing the same problem. The following code throws an error when running curlylint.

Code: `

                      </div>`

Error: 117:38 Parse error: expected one of '>', 'attribute', '{#', '{%', '{{' at 117:38 parse_error Oh no! 💥 💔 💥 1 error reported

Please let me know, if there are more informations needed to reproduce the error.