trivago / prettier-plugin-twig-melody

Code formatting plugin for Prettier which can handle Twig/Melody templates
Apache License 2.0
155 stars 35 forks source link

Way to make dot in html attribute valid ? #100

Open jphilung opened 2 years ago

jphilung commented 2 years ago

I am using alpine.js (https://alpinejs.dev/directives/on) which uses a dot modifier on some html attribute. This causes the prettier parser to fail because it's not a valid character.

Expected a valid attribute name, but instead found ".", which is not part of a valid attribute name.

azmy60 commented 2 years ago

I get the same problem too.

jankuss96 commented 2 years ago

I get also the same issue.

kevinmu17 commented 2 years ago

Same goes for everything you can do with alpine, not only dots. but also plain javascript isn't working for prettier either. ()=>{ x = x++} etc

SVG's are also not 'allowed', i'm searching for an option to disable these checks

<svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 27.584 27.565">
faheemhameed commented 1 year ago

Same issue here as well.

Jupi007 commented 1 year ago

I would love to see this be fixed...

davidwebca commented 1 year ago

I'm piling on, this is also bothering me.

qstiegler commented 1 year ago

Also the @ is valid with AlpineJS. Please try to fix this!

JoeriE commented 1 year ago

Someone found a solution for this?