jamesallardice / jslint-error-explanations

:memo: Explanations of all the (sometimes cryptic) error messages thrown by JSLint and JSHint
http://linterrors.com
293 stars 35 forks source link

Missing Bad Assignment explanation #7

Closed piuccio closed 10 years ago

piuccio commented 11 years ago

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

jamesallardice commented 11 years ago

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.

jamesallardice commented 10 years ago

http://jslinterrors.com/bad-assignment