JSHint and .jshintrc

IntelliJ supports JSHint - which is pretty cool, but is there any way to actually have it enforce JSHint rules set in the .jshintrc file?

Thanks!

6 comments
Comment actions Permalink

Hi Matan,

could you please describe .jshintrc file format?

Thanks.

0
Comment actions Permalink

Sure, the format is a JSON file like the following:

https://github.com/jshint/node-jshint/blob/master/.jshintrc

Ideally IntelliJ could recognize this and use it's values instead of thru the UI.  Or maybe the "predefined" field in the JSHint window could accept it.

I noticed the file ".idea/jsLinters/jshint.xml" in a project with it enabled, but the format is different as well.

0
Comment actions Permalink

An option like

  (o) .jshintrc settings overrule this configuration
  (  ) this configuration overrules .jshintrc settings

could be used.
Or a similar thing like with maven pom.xml -> automatic import if .jshintrc files is changed.

BTW, there is as well a configuration file named '.jshintignore' with file glob patterns excluding special files from jshint validation.

Example for .jshintignore:


node_modules
*.min.js


Would be great if this could be supported as well!

Thnx.
Heinrich
0
Comment actions Permalink

I'd be interested in that, too.


0
Comment actions Permalink

I have need of .jshintignore support. http://youtrack.jetbrains.com/issue/WEB-8471 seems relevant if anybody else is interested in excluding 3rd party libs.

0

Please sign in to leave a comment.