Skip to content

Instantly share code, notes, and snippets.

@af
Created March 1, 2013 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save af/5068825 to your computer and use it in GitHub Desktop.
Save af/5068825 to your computer and use it in GitHub Desktop.
Current jshintrc settings
{
// JSHint Settings config
// See http://www.jshint.com/options/ for a full description of these (and some more) options.
//
// Comments are used liberally, even though they are not valid inside JSON. Make sure
// they are stripped out before running JSON.parse on this file.
// JSHint Running
"passfail" : false, // Stop on first error if this is true.
"maxerr" : 100, // Maximum errors before stopping.
// Predefined globals that JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
"node" : true,
"rhino" : false,
"couch" : false,
"wsh" : false,
"jquery" : false,
"prototypejs" : false,
"mootools" : false,
"dojo" : false,
"predef" : ["rh", "jQuery", "$", "Backbone", "_", "FB", "Handlebars", // Array of extra global names to tolerate
"before", "describe", "it"
],
// Development.
"debug" : false, // Allow debugger statements e.g. browser breakpoints.
"devel" : true, // Allow development statements e.g. `console.log();`.
// EcmaScript 5.
"es5" : true, // Allow EcmaScript 5 syntax.
"strict" : false, // Require `use strict` pragma in every file.
"globalstrict" : false, // Allow global "use strict" (also enables 'strict').
// Enforcing Options
// These options tell JSHint to be more strict towards your code.
"bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
"curly" : false, // Require {} for every new block or scope.
"eqeqeq" : true, // Require triple equals i.e. `===`.
"forin" : false, // Require `for in` loops to filter with `hasOwnPrototype`.
"immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"latedef" : false, // Prohibit variable use before definition.
"newcap" : false, // Require capitalization of all constructor functions e.g. `new F()`.
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"noempty" : true, // Prohibit use of empty blocks.
"nonew" : false, // Prohibit use of constructors for side-effects.
"plusplus" : false, // Prohibit use of `++` & `--`.
"regexp" : true, // Prohibit `.` and `[^...]` in regular expressions.
"trailing" : true, // Prohibit trailing whitespaces.
"undef" : true, // Require all non-global variables be declared before they are used.
// Relaxing Options
// These options allow you to suppress certain types of warnings.
"asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
"boss" : false, // Tolerate assignments inside if, for & while.
"eqnull" : true, // Tolerate use of `== null`.
"evil" : false, // Tolerate use of `eval`.
"expr" : true, // Tolerate `ExpressionStatement` as Programs.
"laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
"loopfunc" : false, // Allow functions to be defined within loops.
"regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
"scripturl" : true, // Tolerate script-targeted URLs.
"shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
"sub" : true, // Tolerate use of subscript notation (e.g. obj['key'] instead of obj.key).
"supernew" : true, // Tolerate `new function () { ... };` and `new Object;`.
// Personal style prefrences.
"nomen" : false, // Prohibit use of initial or trailing underbars in names.
"onevar" : false, // Allow only one `var` statement per function.
"white" : false // Check against strict whitespace and indentation rules.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment