How do I remove javascript validation from my eclipse project?
Solution 1:
I actually like MY JavaScript files to be validated, but I definitely don't want to validate and deal with trivial warnings with third party libraries.
That's why I think that turning off validation all together is too drastic. Fortunately with Eclipse, you can selectively remove some JavaScript sources from validation.
- Right-click your project.
- Navigate to: Properties → JavaScript → Include Path
- Select Source tab. (It looks identical to Java Build Path Source tab.)
- Expand JavaScript source folder.
- Highlight
Excluded
pattern. - Press the Edit button.
- Press the Add button next to
Exclusion patterns
box. - You may either type Ant-style wildcard pattern, or click
Browse
button to mention the JavaScript source by name.
The information about JavaScript source inclusion/exclusion is saved into .settings/.jsdtscope
file. Do not forget to add it to your SCM.
Here is how configuration looks with jQuery files removed from validation:
Solution 2:
Turn off the JavaScript Validator in the "Builders" config for your project:
- Right click your project
- Select Properties -> Builders
- Uncheck the "JavaScript Validator"
Then either restart your Eclipse or/and rename the .js to something like .js_ then back again.