Skip to content

Instantly share code, notes, and snippets.

@ejamesc
Created March 30, 2013 08:55
Show Gist options
  • Select an option

  • Save ejamesc/5275963 to your computer and use it in GitHub Desktop.

Select an option

Save ejamesc/5275963 to your computer and use it in GitHub Desktop.
.jshintrc file.
{
// See http://www.jshint.com/options/ for in-depth explanations
// Predefined globals that JSHint ignores
"browser" : true, // standard globals like 'window'
"devel" : true, // development globals, e.g. 'console'
"dojo" : true, // dojo toolkit globals
"nonstandard" : true, // widely-adopted globals, e.g. 'escape'
"predef" : [ // extra globals
"ripcord", // opscenter globals
"$rcp" // ripcord phrases
],
// Development
"debug" : false, // warn about debugger statements
// ECMAScript 5
"es5" : true, // allow ES5 syntax
// Enforcing
"bitwise" : true, // prohibit the use of bitwise operations (slow and '&' is usually supposed to be '&&')
"curly" : true, // require {} for all blocks/scopes
"latedef" : true, // prohibit variable use before definition ("hoisting")
"noempty" : true, // prohibit empty blocks
"trailing" : true, // no trailing whitespace is allowed
"undef" : true, // prevent the use of undeclared variables
// Relaxing
"sub" : true // allow all subscript notation, including '[]'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment