Implement basic full validation. See
https://github.com/angelozerr/tern-lint/issues/33