Skip to content

Instantly share code, notes, and snippets.

@jpvincent
Created April 28, 2014 19:23

Revisions

  1. jpvincent created this gist Apr 28, 2014.
    35 changes: 35 additions & 0 deletions .jshintrc pour élèves
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    {
    "eqeqeq": true, // This options prohibits the use of == and != in favor of === and !==.
    "noarg": true, // This option prohibits the use of arguments.caller and arguments.callee
    "undef": true, // This option prohibits the use of explicitly undeclared variables
    "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
    "maxdepth": 3,
    "camelCase": true,
    "curly": true, // This option requires you to always put curly braces around blocks in loops and conditionals
    "immed": true, // This option prohibits the use of immediate function invocations without wrapping them in parentheses
    "indent": 2, // This option enforces specific tab width for your code
    "latedef": "nofunc", //This option prohibits the use of a variable before it was defined, Setting this option to "nofunc" will allow function declarations to be ignored.
    "noempty": true, // This option warns when you have an empty block in your code
    "nonbsp": true,
    "strict": true,
    "maxparams": 3, // This option lets you set the max number of formal parameters allowed per function

    "debug": true, // This option suppresses warnings about the debugger statements in your code
    "eqnull": true, // This option suppresses warnings about == null comparisons. Such comparisons are often useful when you want to check if a variable is null or undefined
    "esnext": true, // This option tells JSHint that your code uses ECMAScript 6 specific syntax
    "loopfunc": true, // This option suppresses warnings about functions inside of loops
    "devel": true, // This option defines globals that are usually used for logging poor-man's debugging: console, alert, etc
    "funcscope":true, // This option suppresses warnings about declaring variables inside of control structures while accessing them later from the outside
    "globalstrict":true, // This option suppresses warnings about the use of global strict mode
    "multistr":true, // This option suppresses warnings about multi-line strings
    "shadow": true, // This option suppresses warnings about variable shadowing i.e. declaring a variable that had been already declared somewhere in the outer scope
    "jquery": true,
    "laxbreak": true, // This option suppresses most of the warnings about possibly unsafe line breakings in your code

    "browser": true,
    "globals": {
    "$": true,
    "_": true
    }
    }