Is there a better way to write this x-init?

Is there a better way to write this: x-init="@this.call('loadCastData')" in a blade file? Currently prettier has some issues with the syntax of the quotes.
8 Replies
LeandroFerreira
what is the goal?
Matthew
MatthewOP6d ago
When I run prettier it gives me an error that the div is not closed. But it is. I think prettier isn't parsing the x-init properly It has 2 sets of quotes and I think that's confusing it
awcodes
awcodes6d ago
Sounds like an ide issue and not a filament issue. But there’s no good lsp for alpine in blade. Unfortunately.
LeandroFerreira
what ide? Could you share the code?
Matthew
MatthewOP6d ago
It's not a filament issue, that's why I put the tag non-filament 😅 This occurs when I run the command npm run prettier. I use phpstorm, but I don't think that has anything to do with it. Will do it the morning In that case I will just put the blade file in the ignore. Problem solved I guess 🤷
awcodes
awcodes6d ago
Just for the record I’ve had to tell phpStorm to ignore a lot of js linting because it just doesn’t understand the syntax. But it all still works. It wants to treat it as Js but it just doesn’t get it. You’re not doing anything wrong it’s just a side effect of the linter.
Matthew
MatthewOP6d ago
So you have to do side quests?🤣
awcodes
awcodes6d ago
No have just learned what squiggly lines I’m ok with. lol
Want results from more Discord servers?
Add your server