Fixed #1221: Add 'globals' to the valOptions list

Signed-off-by: Anton Kovalyov <anton@kovalyov.net>
Fixed #826, fixed #870: Add jshint ignore directive

Signed-off-by: Anton Kovalyov <anton@kovalyov.net>