bitHound Blog

Customizing JSHint on bitHound

When it comes to project analysis, there are a number of critics bitHound takes into consideration. One of those critics includes lint. bitHound's lint reporting is produced by running JSHint over your project's JavaScript files. By default, we use a slightly modified default configuration to tell JSHint what types of errors we report on. While this is the configuration we choose to deploy, we also understand that many of you have put great thought into how you want your project's linting to happen. Because of this, bitHound will use the linting configuration your project already uses.

You can configure your project's JSHint options in a couple of ways:

JSHint uses two configuration files that alter what files are analyzed as well as what errors are reported. You can use a .jshintignore and a .jshintrc to ignore files and alter errors to report on, respectively.

Ignoring files To ignore files, simply commit a .jshintignore to the root directory of your project. It follows the exact same convention as .gitignore. You can insert different .jshintignore files into your subdirectories so that different configurations apply to different folders but it's totally optional.

Setting linting rules When it comes to linting rules, you can do the same with at .jshintrc. There are many rules with that can be turned on or off for whatever suits your needs best. For full documentation on all options, check out: http://jshint.com/docs/options/

Once you have committed these configuration files to your project, the next time bitHound runs its analysis, it will pick up those rules and apply them to your projects results.

bitHound identifies risks and priorities in your Node.js projects.