Another reason could be that you acidentically added a Javascript nature to your project unintentionally (i just did this by accident) which enables javascript error checking.
removing this ....javascriptnature from your project fixes that.
(this is ofcourse only if you dont want eclipse to realise you have any JS)