Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Alpine.js syntax #140

Open
Alex3917 opened this issue Sep 23, 2022 · 1 comment
Open

Support Alpine.js syntax #140

Alex3917 opened this issue Sep 23, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@Alex3917
Copy link

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.

@Alex3917 Alex3917 added the enhancement New feature or request label Sep 23, 2022
@jkaeske
Copy link

jkaeske commented Feb 23, 2023

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

Code:
<div class="ml-auto pl-3"> <div class="-mx-1.5 -my-1.5"> <button type="button" class="inline-flex rounded-md bg-green-50 p-1.5 text-green-500 hover:bg-green-100 focus:outline-none focus:ring-2 focus:ring-green-600 focus:ring-offset-2 focus:ring-offset-green-50" @click="dismiss = true"> <span class="sr-only">Dismiss</span> <!-- Heroicon name: mini/x-mark --> <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> <path d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"></path> </svg> </button> </div> </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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants