env:
    node: true
    es6: true
    mocha: true

extends: "eslint:recommended"

rules:
    indent: ["warn", 2]
    # indent: ["warn", 2, {
    #     "SwitchCase": 1,
    #     "MemberExpression": "off",
    #     "CallExpression": { "arguments": "off" }
    # }]
    # linebreak-style: ["error", "unix"]

    quotes: ["warn", "double"]
    no-unused-vars: ["off", { vars: "local", args: "none" }]

    dot-notation: "warn"
    no-extra-semi: "error"

    array-bracket-spacing: "warn"
    block-spacing: "warn"
    brace-style: ["warn", "stroustrup"]
    comma-dangle: ["warn", "only-multiline"]
    comma-spacing: "warn"
    comma-style: "error"
    func-call-spacing: "warn"
    key-spacing: "warn"
    keyword-spacing: "warn"

    max-depth: ["warn", 4]
    max-len: ["warn", 120]
    max-nested-callbacks: ["error", 4]
    max-statements-per-line: "error"
    new-cap: ["error", { "newIsCap": true, "capIsNew": false }]
    no-mixed-operators: "warn"
    no-nested-ternary: "error"
    no-trailing-spaces: "warn"
    no-whitespace-before-property: "error"

    object-curly-spacing: ["warn", "always"]
    one-var: ["error", { "initialized": "never" }]

    semi-spacing: "warn"
    semi: ["error", "always"]
    space-before-blocks: "warn"
    space-before-function-paren: ["warn", {"anonymous": "always", "named": "never"}]
    space-in-parens: ["error", "never"]
    space-infix-ops: "warn"
    space-unary-ops: ["warn", { "words": true, "nonwords": false }]

    block-scoped-var: "error"
    no-shadow: "warn"
    no-use-before-define: ["error", "nofunc"]

    curly: "error"

    eqeqeq: "error"
