tern.java icon indicating copy to clipboard operation
tern.java copied to clipboard

Validators should be run on JS folders only

Open acarstoiu opened this issue 8 years ago • 4 comments

In a JS project's properties there's an Include Path section which among others allows one to set the source folders. Here I have a js folder listed as source folder, with the exclusion */node_modules (it's a Node.js project).

The problem is that folder js/xyz/node_modules is scanned by JSHint for errors, when it should not be (which is annoying, those are third party modules). I also tried excluding this folder specifically, but it doesn't have any effect. It looks like tern does not take into account exclusions specified in on source folders. I have not tested if inclusions are observed.

acarstoiu avatar Jun 22 '16 16:06 acarstoiu

Forgot to say I'm using the latest release, 1.2.0.

acarstoiu avatar Jun 22 '16 16:06 acarstoiu

You must use **/node_modules/* as pattern.

angelozerr avatar Jun 22 '16 17:06 angelozerr

This does the trick for tern, but has side effects with JSDT because the pattern **/node_modules/* only excludes files, not folders.

acarstoiu avatar Jun 23 '16 09:06 acarstoiu

Sorry I have not understood. I suggest you that you share a little project with your problem and tell me which files causes problems. Thanks.

angelozerr avatar Jun 23 '16 09:06 angelozerr