Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run jshint on all projects by default #29

Open
samuelmburu opened this issue Oct 25, 2012 · 9 comments
Open

Run jshint on all projects by default #29

samuelmburu opened this issue Oct 25, 2012 · 9 comments
Labels

Comments

@samuelmburu
Copy link

For some odd reason, I've not been able to get the jshint-elipse plugin working. I've tried with multiple eclipse versions both 32 and 64 bit (helios, indigo and juno) (32 + 64 bit tested on OSX) and am not sure what is going on.

How I've tested:


1.After installing the plugin and restarting Eclipse, I then add the following options to jshint:

strict: true

(no quotes)

2.After which, I close all open editors and open a js file. I do bad things, like create functions without "use strict". I've also tried adding

white: true

Yielding no warnings whatsoever.

Am I doing something wrong or have I missed a step?

--Thanks in advance

@ralfstx
Copy link
Member

ralfstx commented Oct 28, 2012

You have to explicitly enable JSHint for your project. You can do so by adding a file pattern on the "JSHint" page in your project's preferences.

@samuelmburu
Copy link
Author

Ralf,

Thanks for the information, I must have missed that in the documentation...
forgive me for not RTFM. It's working now

Thanks again,
Samuel M

On Sun, Oct 28, 2012 at 3:48 AM, Ralf Sternberg [email protected]:

You have to explicitly enable JSHint for your project. You can do so by
adding a file pattern on the "JSHint" page in your project's preferences.


Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-9844550.

@ralfstx
Copy link
Member

ralfstx commented Oct 29, 2012

Maybe it's not obvious. I wanted to avoid checking all files by default for performance reasons. JSHint is written in JavaScript, and running large scripts is not exactly fast. OTOH, checking all *.js files by default (maybe excluding .min.js files) would not affect non-JS projects, and for JS-ony workspaces, checking all projects is probably useful...

@FagnerMartinsBrack
Copy link

@ralfstx
I would like to encourage this idea. It would be extremely useful, JS developers with JSHINT want to validate every *.js file in any project except for vendor specifics or minified ones.

@machineghost
Copy link

@ralfstx I agree that it would be better for the plug-in to "just work", with a *.js pattern, rather than requiring configuration initially. If both Sam and I missed that step the first time we installed the plug-in, I'm sure many others did as well.

Also, given that the front page of the GitHub project says:

 It automatically validates *.js files

if you don't make that change then a verbiage change would seem warranted.

@ralfstx
Copy link
Member

ralfstx commented Jun 3, 2013

Changed the title to reflect the actual suggestion. Not sure if it is possible at all because at some point the builder has to be added to the project.

@Splaktar
Copy link

Splaktar commented Jul 9, 2014

Thank you for this issue. I just ran into it today. It would be helpful if this was more clearly stated on the http://github.eclipsesource.com/jshint-eclipse/about.html

@andersoxie
Copy link

I have the same problem but does not get it to run even if I done the above. At least I think I have don it. Any other things that one need to do?

@andersoxie
Copy link

I had to build my project to get JSHint to detect the errors I had. Can I get it to run automatically as the java compiler does, if dp how?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants