-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explain "Unexpected 'typeof" #10
Comments
JSLint used to enforce Douglas Crockford is against old style. Once upon a time, old styles were necessary, but times have changed. For example, the old style of embedded scripts used to be: <script language="JavaScript" type="text/javascript">
<!--
...
//-->
</script> But now, Crockford prefers the modern style: <script>
...
</script> http://javascript.crockford.com/style1.html A similar modernization of style has occurred with See the JSLint discussion: Crockford basically says that |
@XP1 - You could write that up into a full article and submit it as a pull request! If you'd rather not, I will get around to adding a page for this message at some point in the near future. |
ESLint no-undefined rule enforces the reverse of it.
Therefore |
Hi team, this is old but I've found this issue and still don't get why JSLint outputs this as wrong code: Thank you! |
JSLint:
Unexpected 'typeof'. Use '===' to compare directly with undefined.
Debatable message. undefined is not real keyword and can be easily reassigned. Shouldn't I compare with typeof instead?
The text was updated successfully, but these errors were encountered: