# Request for compiler to throw error

**URL:** <https://discourse.aurelia.io/t/request-for-compiler-to-throw-error/2814>\
**Category:** Help Requests\
**Created:** [August 5, 2019, 8:49am UTC](https://discourse.aurelia.io/t/request-for-compiler-to-throw-error/2814 "2019-08-05T08:49:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremyholt](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/jeremyholt/32/1098_2.png) [@jeremyholt](https://discourse.aurelia.io/u/jeremyholt)\
**Post date:** [August 5, 2019, 8:49am UTC](https://discourse.aurelia.io/t/request-for-compiler-to-throw-error/2814/1 "2019-08-05T08:49:25Z")

</div>

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

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

```

Note the missing `=` sign!

---

<div class="post-metadata">

**Author:** ![arnederuwe](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/arnederuwe/32/737_2.png) [@arnederuwe](https://discourse.aurelia.io/u/arnederuwe)\
**Post date:** [August 5, 2019, 10:53am UTC](https://discourse.aurelia.io/t/request-for-compiler-to-throw-error/2814/2 "2019-08-05T10:53:41Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![jeremyholt](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/jeremyholt/32/1098_2.png) [@jeremyholt](https://discourse.aurelia.io/u/jeremyholt)\
**Post date:** [August 5, 2019, 2:52pm UTC](https://discourse.aurelia.io/t/request-for-compiler-to-throw-error/2814/3 "2019-08-05T14:52:44Z")

</div>

I am using VS code and beautify.

It doesn’t pick up the error

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/2X/e/ec5fbe1613b4049bad5f60e233056fb9ed560ae4.png)

---

<div class="post-metadata">

**Author:** ![arnederuwe](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/arnederuwe/32/737_2.png) [@arnederuwe](https://discourse.aurelia.io/u/arnederuwe)\
**Post date:** [August 6, 2019, 6:20am UTC](https://discourse.aurelia.io/t/request-for-compiler-to-throw-error/2814/4 "2019-08-06T06:20:00Z")

</div>

![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/2X/a/a12c66801ff53d1785de219f38af6b7274b5935b.png)  
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.
