I read a lot about JSHint configurator but missed one moment that would be helpful for me. For example when i write document.geetElementById
(there is an extra e) it says nothing. Is there any way to make JSHint to show errors like this? Thanks.
Make JSHint to show error in function's name
69 Views Asked by Dmitriy Baranov At
1
No, you cannot configure it like that, because it can't determine whether document has a
geetElementById
method or not. (What if you tried adding one, that has almost the same name as a built-in function it should know about?)On the other hand, if you mistyped
document
(depending on your settings) you would get a warning, because jshint looks for a variable declaration by that name.document
, of course, is an exception, because you don't define it in your code, but it's globally available - jshint knows about this either because you set it using theglobals
option, or you've specified abrowser
environment.