Request for compiler to throw error

I wonder if it would be possible for the compiler to throw an error if click.delegate is not actually assigned to anything

<button click.delegate"addNew()">Add new</button>

Note the missing = sign!

1 Like

IMO, this should throw an error way before the Aurelia template compiler touches it, as that isn’t compliant HTML.
If you are using VScode, the Prettier plugin catches these things for you, or any other HTML linting tool…

1 Like

I am using VS code and beautify.

It doesn’t pick up the error

1 Like


Prettier does ¯_(ツ)_/¯

Joking aside, I would strongly oppose doing these checks in the Aurelia template compiler. The strong point of Aurelia is standards compliance, therefore you get a lot of things ‘for free’ from existing tools, like template linting. It would defeat the purpose of incorporating these when there are so many tools already available IMO.

1 Like