Skip to content

Instantly share code, notes, and snippets.

@bjrmatos
Last active August 29, 2015 14:00
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 bjrmatos/11306932 to your computer and use it in GitHub Desktop.
Save bjrmatos/11306932 to your computer and use it in GitHub Desktop.
My personal configuration .jshintrc
{
// Documentation: http://www.jshint.com/docs/options/
// Predefined globals who JSHint will ignore.
"browser": true, // Standard browser globals e.g. `window`, `document`.
"node": true,
"rhino": false,
"couch": false,
"wsh": false, // Windows Scripting Host.
"jquery": true,
"prototypejs": false,
"mootools": false,
"dojo": false,
"predef": [ // Extra globals.
"require",
"define"
],
// Development.
"debug": false, // Allow debugger statements e.g. browser breakpoints, debugger.
"devel": true, // Allow development statements e.g. `console.log();`.
// EcmaScript 5.
"strict": false, // Require `use strict` pragma in every file.
"globalstrict": false, // Allow global "use strict" (also enables 'strict').
// Ensure The Good Parts of Javascript.
"asi": false, // Tolerate Automatic Semicolon Insertion (no semicolons).
"boss": true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
"sub": true, // This option suppresses warnings about using [] notation when it can be expressed in dot notation.
"evil": false, // Tolerate use of `eval`.
"camelcase": true, // This option allows you to force all variable names to use either camelCase style or UPPER_CASE with underscores.
"expr": true, // Tolerate `ExpressionStatement` as Programs.
"funcscope": false, // Allow declaring variables inside of control structures while accessing them later from the outside.
"bitwise": true, // Prohibit bitwise operators (&, |, ^, etc.).
"latedef": "nofunc", // Prohibit variable use before definition.
"curly": true, // Require {} for every new block or scope.
"newcap": true, // Require capitalize names of constructor functions.
"noarg": true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"indent": 2, // Require n number of indentation
"eqeqeq": true, // Require triple equals i.e. `===`.
"eqnull": true, // Tolerate use of `== null`.
"esnext": true, // Allow EcmaScript 6 syntax.
"lastsemic": false, // Allow omit semicolon for the last statement in a one-line block.
"immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );
//"quotmark": true, // Don't force any particular style of quotes, values can be `true`, `single`, `double`
"laxbreak": false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
"forin": true, // Tolerate `for in` loops without `hasOwnPrototype`.
"loopfunc": false, // Allow functions to be defined within loops.
"regexp": true, // Prohibit `.` and `[^...]` in regular expressions.
"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;`.
"supernew": false, // Tolerate `new function () { ... };` and `new Object;`.
"undef": true, // Require all non-global variables be declared before they are used.
"unused": true, // This option warns when you define and never use your variables.
"trailing": true, // This option makes it an error to leave a trailing whitespace in your code.
"smarttabs": true, // This option suppresses warnings about mixed tabs and spaces when the latter are used for alignmnent only.
"maxcomplexity": 18
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment