.jshintrc 1.68 KB
Newer Older
Isabella Skořepová's avatar
Isabella Skořepová committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{
    // JSHint Default Configuration File (as on JSHint website)
    // See http://jshint.com/docs/ for more details

    "maxerr"        : 50,       // {int} Maximum error before stopping

    // Enforcing
    "camelcase"     : true,    // true: Identifiers must be in camelCase
    "curly"         : false,     // true: Require {} for every new block or scope
    "nonew"         : true,    // true: Prohibit use of constructors for side-effects (without assignment)
    "quotmark"      : "single",    // Quotation mark consistency
    "strict"        : false,     // true: Requires all functions run in ES5 Strict Mode

    "maxparams"     : 5,    // {int} Max number of formal params allowed per function
    "maxdepth"      : 5,    // {int} Max depth of nested blocks (within functions)
    "maxstatements" : 40,    // {int} Max number statements per function
17
    "maxcomplexity" : 20,    // {int} Max cyclomatic complexity per function
Isabella Skořepová's avatar
Isabella Skořepová committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
    "maxlen"        : 120,    // {int} Max number of characters per line

    // Relaxing
    "asi"           : true,     // true: Tolerate Automatic Semicolon Insertion (no semicolons)
    "esversion"     : 6,         // {int} Specify the ECMAScript version to which the code must adhere.
    "funcscope"     : true,     // true: Tolerate defining variables inside control statements

    // Environments
    "browser"       : false,     // Web Browser (window, document, etc)
    "devel"         : true,     // Development/debugging (alert, confirm, etc)
    "jquery"        : false,    // jQuery
    "mocha"         : true,     // Mocha
    "node"          : true,    // Node.js

    // Custom Globals
    "globals"       : {}        // additional predefined global variables
}