brunch / jshint-brunch

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

JSHintLinter.lint() called for each file, but only first file gets the correct .jshintrc configs, others get a default one. #11

Closed SGevorg closed 9 years ago

SGevorg commented 9 years ago

Hello,

Thanks for lightweight and good software. I have encountered an issue with the plugin using on my angular app. JSHintLinter.lint method is called on every file to lint. The linter is passed this.options.

The issue is that if I want to use my .jshintrc file, this.options is my custom .jshintrc file's content only for the first time JSHintLinter.lint is called. After that some default configs are passed - the this.options is changed somehow.

I saw that because I printed this.options and my predef values were present only in the first call. I have hacked to always pass the correct options. However would appreciate if you could provide some hint/info about the causes or even better, a fix for this issue, so that it would be fixed properly. My plugin configs are: plugins: { digest: { referenceFiles: /.html$/, precision: 12, alwaysRun: false }, jshint: { pattern: /^app\/.*.js$/ } }

es128 commented 9 years ago

@SGevorg I can't see why this would be happening and cannot reproduce. Do you still observe the issue with the latest master branch version of the plugin? npm install brunch/jshint-brunch