The typical use of jshint involves including rules in a .jshintrc or Gruntfile.js. This does not scale to multi-repo organizations, as .jshintrc files must be made in each repo, and organization-widge changes to these rules must be copied to each repo's .jshintrc file.
Fortunately, it's easy to formalize and enforce style standards in your organization's Javascript. Here we describe the pattern we use.
The overview:
- Formalize your style into JSHint rules (i.e. identify the rules you would place in a
.jshintrcfile) - Centralize access to jshint rules via a packaging pattern (described below)
- Require jshint conformance in unit testing/code reviews/deployments.