I use the examples from the CoffeeScript homepage and it doesn't validate.
The for
loop one is a perfect example, if you use the coffeescript statement it doesn't wrap the body in an if
statement.
My compiled CoffeeScript won't validate in JShint .. why?
The short answer would be: Because the creators of the CoffeeScript compiler didn't deem it necessary.
It makes sense to lint code which is written and maintained by developers. It avoids human errors by making code readable.
The code generated by a compiler on the other hand has completely different requirements. Readability is usually not a concern. It's more important that the code is efficient and small.
If you really want this then you need to modify the CoffeeScript compiler source.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With