jamesallardice/jslint-error-explanations

Missing Bad Assignment explanation

Closed this issue · 2 comments

Hello,
I love this site but I noticed that it lacks an explanation for Bad assignment and how to disable it.

The error is raised in cases like this

callAFunction() = 12;

Thanks

Thanks, I'm glad you like the site. The code in your question will throw a ReferenceError. You can't assign to a function invocation.

However, you are right, there isn't an article for the "Bad assignment" error yet. I will get around to writing it eventually, but if you have some time feel free to research it and write one! That's why the project is on GitHub after all.