{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "JSON schema for JSCS configuration files",
    "definitions": {
        "validateJSDoc": {
            "description": "Enables JSDoc validation.",
            "type": "object",
            "properties": {
                "checkParamNames": {
                    "description": "Ensures param names in jsdoc and in function declaration are equal",
                    "type": "boolean"
                },
                "checkRedundantParams": {
                    "description": "Ensures params in jsdoc contains type",
                    "type": "boolean"
                },
                "requireParamTypes": {
                    "description": "Reports redundant params in jsdoc",
                    "type": "boolean"
                }
            },
            "additionalProperties": true
        },
        "braceRules": {
            "type": [
                "null",
                "object"
            ],
            "properties": {
                "beforeOpeningRoundBrace": {
                    "type": "boolean"
                },
                "beforeOpeningCurlyBrace": {
                    "type": "boolean"
                }
            }
        },
        "keywords": {
            "type": [
                "array",
                "null"
            ],
            "items": {
                "enum": [
                    "break",
                    "case",
                    "catch",
                    "continue",
                    "debugger",
                    "default",
                    "delete",
                    "do",
                    "else",
                    "finally",
                    "for",
                    "function",
                    "if",
                    "in",
                    "instanceof",
                    "new",
                    "return",
                    "switch",
                    "this",
                    "throw",
                    "try",
                    "typeof",
                    "var",
                    "void",
                    "while",
                    "with"
                ]
            }
        },
        "operators": {
            "type": [
                "array",
                "boolean",
                "null"
            ],
            "items": {
                "enum": [
                    "?",
                    "+",
                    "-",
                    "/",
                    "*",
                    "=",
                    "==",
                    "===",
                    "!=",
                    "!==",
                    ">",
                    ">=",
                    "<",
                    "<=",
                    null
                ]
            }
        },
        "unaryOperators": {
            "type": [
                "array",
                "boolean",
                "null"
            ],
            "items": {
                "enum": [
                    "++",
                    "--",
                    "+",
                    "-",
                    "~",
                    "!"
                ]
            }
        }
    },
    "type": "object",
    "properties": {
        "requireCurlyBraces": {
            "$ref": "#/definitions/keywords"
        },
        "requireSpaceAfterKeywords": {
            "$ref": "#/definitions/keywords"
        },
        "disallowSpaceAfterKeywords": {
            "$ref": "#/definitions/keywords"
        },
        "requireSpaceBeforeBlockStatements": {
            "description": "Requires space before block statements (for loops, control structures).",
            "type": "boolean"
        },
        "disallowSpaceBeforeBlockStatements": {
            "description": "Disallows space before block statements (for loops, control structures).",
            "type": [
                "null",
                "boolean"
            ]
        },
        "requireParenthesesAroundIIFE": {
            "description": "Requires parentheses around immediately invoked function expressions.",
            "type": "boolean"
        },
        "requireSpacesInFunctionExpression": {
            "$ref": "#/definitions/braceRules"
        },
        "requireSpacesInAnonymousFunctionExpression": {
            "$ref": "#/definitions/braceRules"
        },
        "disallowSpacesInAnonymousFunctionExpression": {
            "$ref": "#/definitions/braceRules"
        },
        "requireSpacesInNamedFunctionExpression": {
            "$ref": "#/definitions/braceRules"
        },
        "disallowSpacesInNamedFunctionExpression": {
            "$ref": "#/definitions/braceRules"
        },
        "requireSpacesInFunctionDeclaration": {
            "$ref": "#/definitions/braceRules"
        },
        "disallowSpacesInFunctionDeclaration": {
            "$ref": "#/definitions/braceRules"
        },
        "disallowSpacesInFunctionExpression": {
            "properties": {
                "beforeOpeningRoundBrace": {
                    "type": "boolean"
                }
            }
        },
        "disallowMultipleVarDecl": {
            "description": "Disallows multiple 'var' declaration (except for-loop).",
            "type": [
                "null",
                "boolean"
            ]
        },
        "requireMultipleVarDecl": {
            "description": "Requires multiple 'var' declaration.",
            "type": [
                "boolean",
                "string"
            ],
            "enum": [
                true,
                "onevar"
            ]
        },
        "requireBlocksOnNewline": {
            "description": "Requires blocks to begin and end with a newline.",
            "type": [
                "boolean",
                "integer"
            ]
        },
        "requirePaddingNewlinesInBlocks": {
            "description": "Requires blocks to begin and end with 2 newlines.",
            "type": [
                "boolean",
                "integer"
            ]
        },
        "disallowSpaceAfterLineComment": {
            "type": [
                "boolean",
                "null"
            ]
        },
        "requireSpaceAfterLineComment": {
            "type": [
                "boolean",
                "null"
            ]
        },
        "disallowSpacesInConditionalExpression": {
            "type": [
                "boolean",
                "null"
            ]
        },
        "requireSpacesInConditionalExpression": {
            "type": [
                "boolean",
                "null"
            ]
        },
        "disallowPaddingNewlinesInBlocks": {
            "description": "Disallows blocks from beginning and ending with 2 newlines.",
            "type": [
                "boolean",
                "null"
            ]
        },
        "disallowEmptyBlocks": {
            "description": "Disallows empty blocks (except for catch blocks).",
            "type": "boolean"
        },
        "disallowSpacesInsideObjectBrackets": {
            "description": "Disallows space after opening object curly brace and before closing.",
            "type": [
                "null",
                "boolean"
            ]
        },
        "disallowSpacesInsideArrayBrackets": {
            "description": "Disallows space after opening array square bracket and before closing.",
            "type": [
                "null",
                "boolean"
            ]
        },
        "disallowSpacesInsideParentheses": {
            "description": "Disallows space after opening round bracket and before closing.",
            "type": [
                "null",
                "boolean"
            ]
        },
        "requireSpacesInsideObjectBrackets": {
            "description": "Requires space after opening object curly brace and before closing.",
            "type": "string",
            "enum": [
                "all",
                "allButNested"
            ]
        },
        "requireSpacesInsideArrayBrackets": {
            "description": "Requires space after opening array square bracket and before closing.",
            "type": "string",
            "enum": [
                "all",
                "allButNested"
            ]
        },
        "requireSpacesInsideParentheses": {
            "type": "string",
            "enum": [
                "all",
                "allButNested"
            ]
        },
        "disallowQuotedKeysInObjects": {
            "description": "Disallows quoted keys in object if possible.",
            "type": [
                "string",
                "boolean"
            ],
            "enum": [
                true,
                false,
                "allButReserved"
            ]
        },
        "disallowDanglingUnderscores": {
            "description": "Disallows identifiers that start or end in '_', except for some popular exceptions:",
            "type": "boolean"
        },
        "disallowSpaceAfterObjectKeys": {
            "description": "Disallows space after object keys.",
            "type": [
                "null",
                "boolean"
            ]
        },
        "requireSpaceAfterObjectKeys": {
            "description": "Requires space after object keys.",
            "type": "boolean"
        },
        "disallowCommaBeforeLineBreak": {
            "description": "Disallows commas as last token on a line in lists.",
            "type": [
                "null",
                "boolean"
            ]
        },
        "requireCommaBeforeLineBreak": {
            "description": "Requires commas as last token on a line in lists.",
            "type": "boolean"
        },
        "requireAlignedObjectValues": {
            "description": "Requires proper alignment in object literals.",
            "type": "string",
            "enum": [
                "all",
                "skipWithFunction",
                "skipWithLineBreak"
            ]
        },
        "requireOperatorBeforeLineBreak": {
            "$ref": "#/definitions/operators"
        },
        "disallowLeftStickedOperators": {
            "$ref": "#/definitions/operators"
        },
        "requireRightStickedOperators": {
            "$ref": "#/definitions/operators"
        },
        "disallowRightStickedOperators": {
            "$ref": "#/definitions/operators"
        },
        "requireLeftStickedOperators": {
            "description": "Requires sticking operators to the left.",
            "type": "array",
            "items": {
                "enum": [
                    ","
                ]
            }
        },
        "disallowSpaceAfterPrefixUnaryOperators": {
            "$ref": "#/definitions/unaryOperators"
        },
        "requireSpaceAfterPrefixUnaryOperators": {
            "$ref": "#/definitions/unaryOperators"
        },
        "disallowSpaceBeforePostfixUnaryOperators": {
            "$ref": "#/definitions/unaryOperators"
        },
        "requireSpaceBeforePostfixUnaryOperators": {
            "$ref": "#/definitions/unaryOperators"
        },
        "disallowSpaceBeforeBinaryOperators": {
            "$ref": "#/definitions/operators"
        },
        "requireSpaceBeforeBinaryOperators": {
            "$ref": "#/definitions/operators"
        },
        "disallowSpaceAfterBinaryOperators": {
            "$ref": "#/definitions/operators"
        },
        "requireSpaceAfterBinaryOperators": {
            "$ref": "#/definitions/operators"
        },
        "disallowImplicitTypeConversion": {
            "description": "Disallows implicit type conversion.",
            "type": "array",
            "items": {
                "enum": [
                    "numeric",
                    "boolean",
                    "binary",
                    "string"
                ]
            }
        },
        "requireCamelCaseOrUpperCaseIdentifiers": {
            "description": "Requires identifiers to be camelCased or UPPERCASE_WITH_UNDERSCORES",
            "type": [
                "boolean",
                "string"
            ],
            "enum": [
                true,
                "ignoreProperties"
            ]
        },
        "disallowKeywords": {
            "$ref": "#/definitions/keywords"
        },
        "disallowMultipleLineStrings": {
            "description": "Disallows strings that span multiple lines without using concatenation.",
            "type": "boolean"
        },
        "disallowMultipleLineBreaks": {
            "description": "Disallows multiple blank lines in a row.",
            "type": "boolean"
        },
        "validateLineBreaks": {
            "description": "Option to check line break characters.",
            "type": "string",
            "enum": [
                "CR",
                "LF",
                "CRLF"
            ]
        },
        "validateQuoteMarks": {
            "description": "Requires all quote marks to be either the supplied value, or consistent if true",
            "type": [
                "object",
                "string",
                "boolean"
            ],
            "properties": {
                "escape": {
                    "type": "boolean"
                },
                "mark": {
                    "type": "string",
                    "enum": [
                        "\"",
                        "'"
                    ]
                }
            },
            "enum": [
                true,
                "\"",
                "'"
            ]
        },
        "validateIndentation": {
            "description": "Validates indentation for arrays, objects, switch statements, and block statements.",
            "type": [
                "string",
                "integer"
            ],
            "minimum": 0
        },
        "disallowMixedSpacesAndTabs": {
            "description": "Requires lines to not contain both spaces and tabs consecutively, or spaces after tabs only for alignment if \"smart\"",
            "type": [
                "boolean",
                "string"
            ],
            "enum": [
                true,
                false,
                "smart"
            ]
        },
        "disallowTrailingWhitespace": {
            "description": "Requires all lines to end on a non-whitespace character.",
            "type": "boolean"
        },
        "disallowTrailingComma": {
            "description": "Disallows an extra comma following the final element of an array or object literal.",
            "type": [
                "null",
                "boolean"
            ]
        },
        "requireTrailingComma": {
            "description": "Requires an extra comma following the final element of an array or object literal.",
            "type": "boolean"
        },
        "disallowKeywordsOnNewLine": {
            "$ref": "#/definitions/keywords"
        },
        "requireKeywordsOnNewLine": {
            "$ref": "#/definitions/keywords"
        },
        "requireLineFeedAtFileEnd": {
            "description": "Requires placing line feed at file end.",
            "type": "boolean"
        },
        "maximumLineLength": {
            "description": "Requires all lines to be at most the number of characters specified.",
            "type": "integer"
        },
        "requireCapitalizedConstructors": {
            "description": "Requires constructors to be capitalized (except for \"this\")",
            "type": "boolean"
        },
        "safeContextKeyword": {
            "description": "Option to check \"var that = this\" expressions.",
            "type": [
                "array",
                "string",
                "boolean"
            ]
        },
        "requireDotNotation": {
            "description": "Requires member expressions to use dot notation when possible.",
            "type": "boolean"
        },
        "disallowYodaConditions": {
            "description": "Requires the variable to be the left hand operator when doing a boolean comparison.",
            "type": "boolean"
        },
        "validateJSDoc": {
            "$ref": "#/definitions/validateJSDoc"
        },
        "excludeFiles": {
            "description": "Disables style checking for specified paths.",
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "additionalRules": {
            "description": "Path to load additional rules",
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "preset": {
            "description": "Extends defined rules with preset rules.",
            "type": "string",
            "enum": [
                "jquery",
                "google"
            ]
        }
    },
    "additionalProperties": true
}