brunch / jshint-brunch

Adds JSHint linting support to Brunch.
7 stars 4 forks source link

jshintrc file reading and warn_only option. #8

Closed loadx closed 10 years ago

loadx commented 10 years ago

Adds support for reading .jshintrc files.

Added option warn_only, if set to true then build process is no longer halted by jshint errors and a warning message is displayed instead.

loadx commented 10 years ago

Woops the finally was left over from before, likewise the instance var. Sorted, cheers for the heads up :)

paulmillr commented 10 years ago

throw will exit the process

paulmillr commented 10 years ago

and it also works with node domains

loadx commented 10 years ago

Awesome, i wasn't aware of that behaviour ill get it patched and push soon.

loadx commented 10 years ago

Patched, Apologies for the delay :(

jas commented 10 years ago

Nice work @loadx.

@paulmillr Would it be possible to get a version bump for this on npm?

es128 commented 10 years ago

@jas have you tried out the master branch? Can you confirm for us everything is working as you'd expect?

jas commented 10 years ago

@es128 Using a .jshintrc and the warn_only option are both working as intended. The only issue is Brunch the CoffeeScript source file was not compiled into /lib so I had to compile it manually to test.

es128 commented 10 years ago

@jas You want to run jshint on compiled CoffeeScript? Why?

Or do you just mean that was your workaround for testing the plugin in an all-coffee project?

jas commented 10 years ago

@es128 Sorry, my mistake. What I meant was when I installed from the master branch via npm, the module wasn't compiled to JS. Looks like this happens when publishing to npm though. https://github.com/brunch/jshint-brunch/blob/master/package.json#L13 This might be confusing for others using the git version — might be better to use postinstall instead of prepublish?

es128 commented 10 years ago

Ah, now I understand. postinstall would require coffee-script to be installed globally for each client, or as a dependency of each plugin, so we don't do that. We just try to keep the up-to-date compiled version in the repo (although I may be experimenting soon with having brunch require the coffee source directly to avoid all compiling).