schema
stringclasses
471 values
key
stringlengths
0
203
description
stringlengths
0
4.37k
object
stringlengths
2
322k
jscsrc.json
requireCurlyBraces
Requires curly braces after statements. A value of true will require curly braces for all the necessary keywords: if, else, for, while do, try, catch, case, and default.
{"type": ["array", "boolean", "null", "object"], "oneOf": [{}, {"type": "object", "properties": {"keywords": {"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}, "allExcept": {"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}}}]}
jscsrc.json
requireCurlyBraces
An object that contains a "keywords" or "allExcept" key equal to an array of quoted exceptions.
{"type": "object", "properties": {"keywords": {"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}, "allExcept": {"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}}}
jscsrc.json
keywords
Array of quoted keywords that would require curly braces.
{"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}
jscsrc.json
allExcept
Array of quoted keywords to exempt. Allows not using braces in some instances; ex. /*allowed:*/ if (x) return; /* not allowed*/ if (x) i++; given "allExcept": ["return", "continue", "break", ...],
{"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}
jscsrc.json
requireDollarBeforejQueryAssignment
Require a $ before variable names that are jquery assignments.
{"type": ["boolean", "null", "string"], "oneOf": [{"type": ["boolean", "string"], "enum": [true, false, "ignoreProperties"]}, {}]}
jscsrc.json
requireDotNotation
Requires member expressions to use dot notation when possible.
{"type": ["boolean", "null", "object", "string"], "oneOf": [{"type": "boolean"}, {}, {"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["keywords"]}, {"enum": ["snake_case"]}]}, "uniqueItems": true}}}, {"type": "string", "oneOf": [{"enum": ["except_snake_case"]}]}]}
jscsrc.json
requireDotNotation
An object that contains an "allExcept" key equal to an array of exception values.
{"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["keywords"]}, {"enum": ["snake_case"]}]}, "uniqueItems": true}}}
jscsrc.json
allExcept
Array of quoted keywords to exempt.
{"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["keywords"]}, {"enum": ["snake_case"]}]}, "uniqueItems": true}
jscsrc.json
items
Allow quoted identifiers made of reserved words.
{"enum": ["keywords"]}
jscsrc.json
items
Allow quoted snake cased identifiers.
{"enum": ["snake_case"]}
jscsrc.json
requireDotNotation
Deprecated in favor of the object "allExcept": ["snake_case"] rule format.
{"type": "string", "oneOf": [{"enum": ["except_snake_case"]}]}
jscsrc.json
requireDotNotation
Allow quoted snake cased identifiers.
{"enum": ["except_snake_case"]}
jscsrc.json
requireEarlyReturn
Requires early return in a function.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireEarlyReturn
If true, disallow the use of `else` if the corresponding parent `if` block contains a return.
{"type": "boolean"}
jscsrc.json
requireEnhancedObjectLiterals
Requires declaring objects via ES6 enhanced object literals.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireFunctionDeclarations
Requires function declarations by disallowing assignment of functions expressions to variables. Function expressions are allowed in all other contexts, including when passed as function arguments or immediately invoked. Assignment of function expressions to object members is also permitted, since these can't be declared.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireImportAlphabetized
Requires imports to be alphabetized (A-Z).
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireKeywordsOnNewLine
Requires placing the specified keywords on a new line.
{"type": ["array", "null"], "oneOf": [{}]}
jscsrc.json
requireLineBreakAfterVariableAssignment
Requires placing line feed after assigning a variable.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireLineFeedAtFileEnd
Requires placing line feed at file end.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireMatchingFunctionName
Requires function names to match member and property names. It doesn't affect anonymous functions nor functions assigned to members or properties named with a reserved word. Assigning to module.exports is also ignored, unless includeModuleExports: true is configured.
{"type": ["boolean", "null", "object"], "oneOf": [{"type": "boolean"}, {}, {"type": "object", "properties": {"includeModuleExports": {"type": "boolean"}}}]}
jscsrc.json
requireMatchingFunctionName
An object that contains an "includeModuleExports" key of boolean type.
{"type": "object", "properties": {"includeModuleExports": {"type": "boolean"}}}
jscsrc.json
requireMultiLineTernary
Requires the test, consequent and alternate to be on separate lines when using the ternary operator.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireMultipleVarDecl
Requires multiple `var` declaration.
{"type": ["boolean", "null", "object", "string"], "oneOf": [{"type": "boolean"}, {}, {"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["require"]}]}, "uniqueItems": true}}}, {"type": "string", "oneOf": [{"enum": ["onevar"]}]}]}
jscsrc.json
requireMultipleVarDecl
If true, it will report only consecutive vars.
{"type": "boolean"}
jscsrc.json
requireMultipleVarDecl
An object that contains an "allExcept" key equal to an array of exception values.
{"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["require"]}]}, "uniqueItems": true}}}
jscsrc.json
allExcept
Array of quoted keywords to exempt.
{"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["require"]}]}, "uniqueItems": true}
jscsrc.json
items
`require` statements are allowed to have a var declaration per variable.
{"enum": ["require"]}
jscsrc.json
requireMultipleVarDecl
If equal to 'onevar', requireMultipleVarDecl will allow only one var per function scope.
{"enum": ["onevar"]}
jscsrc.json
requireNamedUnassignedFunctions
Require unassigned functions to be named inline.
{"type": ["boolean", "null", "object"], "oneOf": [{"type": "boolean"}, {}, {"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}}}]}
jscsrc.json
requireNamedUnassignedFunctions
An object that contains an "allExcept" key equal to an array of quoted exceptions.
{"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}}}
jscsrc.json
allExcept
Array of quoted keywords to exempt.
{"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}
jscsrc.json
requireNewlineBeforeBlockStatements
Requires newline before opening curly brace of all block statements. If true, always requires newline before curly brace of block statements. Array specifies block-type keywords after which newlines are required before curly brace.
{"type": ["array", "boolean", "null"], "oneOf": [{}]}
jscsrc.json
requireNumericLiterals
Requires use of binary, hexadecimal, and octal literals instead of parseInt.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireObjectDestructuring
Requires variable declarations from objects via destructuring.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireObjectKeysOnNewLine
Requires placing object keys on new line.
{"type": ["boolean", "null", "object"], "oneOf": [{"type": "boolean"}, {}, {"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["sameLine"]}]}, "uniqueItems": true}}}]}
jscsrc.json
requireObjectKeysOnNewLine
An object that contains an "allExcept" key equal to an array of quoted exceptions.
{"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["sameLine"]}]}, "uniqueItems": true}}}
jscsrc.json
allExcept
Array of quoted keywords to exempt.
{"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["sameLine"]}]}, "uniqueItems": true}
jscsrc.json
items
Ignores the rule if all the keys and values are on the same line.
{"enum": ["sameLine"]}
jscsrc.json
requireOperatorBeforeLineBreak
Requires operators to appear before line breaks and not after.
{"type": ["array", "boolean", "null"], "oneOf": [{}]}
jscsrc.json
requirePaddingNewLineAfterVariableDeclaration
Requires an extra blank newline after var declarations, as long as it is not the last expression in the current block.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requirePaddingNewLinesAfterBlocks
Requires newline after blocks.
{"type": ["boolean", "null", "object"], "oneOf": [{"type": "boolean"}, {}, {"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["inCallExpressions"]}, {"enum": ["inNewExpressions"]}, {"enum": ["inArrayExpressions"]}, {"enum": ["inProperties"]}]}, "uniqueItems": true}}}]}
jscsrc.json
requirePaddingNewLinesAfterBlocks
If true, always require a newline after blocks.
{"type": "boolean"}
jscsrc.json
requirePaddingNewLinesAfterBlocks
An object that contains an "allExcept" key equal to an array of quoted exceptions.
{"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["inCallExpressions"]}, {"enum": ["inNewExpressions"]}, {"enum": ["inArrayExpressions"]}, {"enum": ["inProperties"]}]}, "uniqueItems": true}}}
jscsrc.json
allExcept
Array of quoted keywords to exempt.
{"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["inCallExpressions"]}, {"enum": ["inNewExpressions"]}, {"enum": ["inArrayExpressions"]}, {"enum": ["inProperties"]}]}, "uniqueItems": true}
jscsrc.json
items
Blocks don't need a line of padding in function argument lists.
{"enum": ["inCallExpressions"]}
jscsrc.json
items
Blocks don't need a line of padding in constructor argument lists.
{"enum": ["inNewExpressions"]}
jscsrc.json
items
Blocks don't need a line of padding in arrays.
{"enum": ["inArrayExpressions"]}
jscsrc.json
items
Blocks don't need a line of padding as object properties.
{"enum": ["inProperties"]}
jscsrc.json
requirePaddingNewLinesAfterUseStrict
Requires a blank line after 'use strict'; statements.
{"type": ["boolean", "null", "object"], "oneOf": [{"type": "boolean"}, {}, {"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["require"]}]}, "uniqueItems": true}}}]}
jscsrc.json
requirePaddingNewLinesAfterUseStrict
If true, require blank line after 'use strict' statements.
{"type": "boolean"}
jscsrc.json
requirePaddingNewLinesAfterUseStrict
An object that contains an "allExcept" key equal to an array of quoted exceptions.
{"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["require"]}]}, "uniqueItems": true}}}
jscsrc.json
allExcept
Array of quoted keywords to exempt.
{"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["require"]}]}, "uniqueItems": true}
jscsrc.json
items
Allows 'require' statements to occur immediately after 'use strict'.
{"enum": ["require"]}
jscsrc.json
requirePaddingNewLinesBeforeExport
Requires newline before module.exports.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requirePaddingNewlinesBeforeKeywords
Requires an empty line above the specified keywords unless the keyword is the first expression in a block. If true, specifies that the spacedKeywords found in the utils module require an empty line above it. Array values indicate keywords that require an empty line above it.
{"type": ["array", "boolean", "null"], "oneOf": [{}]}
jscsrc.json
requirePaddingNewLinesBeforeLineComments
Requires newline before line comments.
{"type": ["boolean", "null", "object"], "oneOf": [{"type": "boolean"}, {}, {"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["firstAfterCurly"]}]}, "uniqueItems": true}}}]}
jscsrc.json
requirePaddingNewLinesBeforeLineComments
If true, always require a newline before line comments.
{"type": "boolean"}
jscsrc.json
requirePaddingNewLinesBeforeLineComments
An object that contains an "allExcept" key equal to an array of quoted exceptions.
{"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["firstAfterCurly"]}]}, "uniqueItems": true}}}
jscsrc.json
allExcept
Array of quoted keywords to exempt.
{"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["firstAfterCurly"]}]}, "uniqueItems": true}
jscsrc.json
items
Comments may be first line of block without extra padding.
{"enum": ["firstAfterCurly"]}
jscsrc.json
requirePaddingNewlinesInBlocks
Requires blocks to begin and end with 2 newlines.
{"type": ["boolean", "integer", "null", "object"], "oneOf": [{"type": "boolean"}, {"type": "integer"}, {}, {"type": "object", "properties": {"open": {"type": "boolean"}, "close": {"type": "boolean"}, "allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["conditionals"]}, {"enum": ["functions"]}]}, "uniqueItems": true}}}]}
jscsrc.json
requirePaddingNewlinesInBlocks
If true, validates all non-empty blocks.
{"type": "boolean"}
jscsrc.json
requirePaddingNewlinesInBlocks
Specifies a minimum number of lines containing elements in the block before validating.
{"type": "integer"}
jscsrc.json
requirePaddingNewlinesInBlocks
At least one of the object properties must be true.
{"type": "object", "properties": {"open": {"type": "boolean"}, "close": {"type": "boolean"}, "allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["conditionals"]}, {"enum": ["functions"]}]}, "uniqueItems": true}}}
jscsrc.json
open
If true, validates that there is a newline after the opening brace in a block.
{"type": "boolean"}
jscsrc.json
close
If true, validates that there is a newline before the closing brace in a block.
{"type": "boolean"}
jscsrc.json
allExcept
Array of quoted keywords to exempt.
{"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["conditionals"]}, {"enum": ["functions"]}]}, "uniqueItems": true}
jscsrc.json
items
Ignores conditional (if, else if, else) blocks.
{"enum": ["conditionals"]}
jscsrc.json
items
Ignores function blocks.
{"enum": ["functions"]}
jscsrc.json
requirePaddingNewLinesInObjects
Requires newline inside curly braces of all objects.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireParenthesesAroundArrowParam
Requires parentheses around arrow function expressions with a single parameter.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireParenthesesAroundIIFE
Requires parentheses around immediately invoked function expressions.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireQuotedKeysInObjects
Requires quoted keys in objects.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireSemicolons
Requires semicolon after: var declaration, expression statement, return, throw, break, continue, do-while.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireShorthandArrowFunctions
Require arrow functions to use an expression body when returning a single statement (no block statement, implicit return).
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireSpaceAfterBinaryOperators
Disallows sticking binary operators to the right.
{"type": ["array", "boolean", "null"], "oneOf": [{}]}
jscsrc.json
requireSpaceAfterComma
Requires space after comma.
{"type": ["boolean", "null", "object"], "oneOf": [{"type": "boolean"}, {}, {"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["trailing"]}]}, "uniqueItems": true}}}]}
jscsrc.json
requireSpaceAfterComma
If true, require a space after any comma.
{"type": "boolean"}
jscsrc.json
requireSpaceAfterComma
An object that contains an "allExcept" key equal to an array of quoted exceptions.
{"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["trailing"]}]}, "uniqueItems": true}}}
jscsrc.json
allExcept
Array of quoted keywords to exempt.
{"type": "array", "minItems": 0, "items": {"type": "string", "oneOf": [{"enum": ["trailing"]}]}, "uniqueItems": true}
jscsrc.json
items
Ignore trailing commas.
{"enum": ["trailing"]}
jscsrc.json
requireSpaceAfterKeywords
Requires space after the specified keywords. A value of true will disallow spaces after all possible keywords.
{"type": ["array", "boolean", "null"], "oneOf": [{}]}
jscsrc.json
requireSpaceAfterLineComment
Requires that a line comment (`//`) be followed by a space.
{"type": ["boolean", "null", "object", "string"], "oneOf": [{"type": "boolean"}, {}, {"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}}}, {"type": "string", "oneOf": [{"enum": ["allowSlash"]}]}]}
jscsrc.json
requireSpaceAfterLineComment
An object that contains an "allExcept" key equal to an array of exception values.
{"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}}}
jscsrc.json
allExcept
Array of allowed strings before space.
{"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}
jscsrc.json
requireSpaceAfterLineComment
Deprecated in favor of the object "allExcept": ["/"] rule format.
{"type": "string", "oneOf": [{"enum": ["allowSlash"]}]}
jscsrc.json
requireSpaceAfterObjectKeys
Requires space after object keys.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireSpaceAfterPrefixUnaryOperators
Disallows sticking unary operators to the right.
{"type": ["array", "boolean", "null"], "oneOf": [{}]}
jscsrc.json
requireSpaceBeforeBinaryOperators
Disallows sticking binary operators to the left.
{"type": ["array", "boolean", "null"], "oneOf": [{}]}
jscsrc.json
requireSpaceBeforeBlockStatements
Requires space before block statements (for loops, control structures).
{"type": ["boolean", "null", "integer"], "oneOf": [{"type": "boolean"}, {}, {"type": "integer", "minimum": 1}]}
jscsrc.json
requireSpaceBeforeBlockStatements
If true, require at least a single space.
{"type": "boolean"}
jscsrc.json
requireSpaceBeforeBlockStatements
Require at least the specified number of spaces. Value must be greater than or equal to 1.
{"type": "integer", "minimum": 1}
jscsrc.json
requireSpaceBeforeComma
Requires a space before a comma.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}
jscsrc.json
requireSpaceBeforeComma
If true, require a space before any comma.
{"type": "boolean"}
jscsrc.json
requireSpaceBeforeKeywords
Requires a space before a keyword.
{"type": ["array", "boolean", "null", "object"], "oneOf": [{}, {"type": "boolean"}, {}, {"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}}}]}
jscsrc.json
requireSpaceBeforeKeywords
If true, report on all possible ES3 keywords except `function`.
{"type": "boolean"}
jscsrc.json
requireSpaceBeforeKeywords
An object that contains an "allExcept" key equal to an array of exception values.
{"type": "object", "properties": {"allExcept": {"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}}}
jscsrc.json
allExcept
Array of allowed strings before space.
{"type": "array", "minItems": 0, "items": {"type": "string"}, "uniqueItems": true}
jscsrc.json
requireSpaceBeforeObjectValues
Requires space after object keys.
{"type": ["boolean", "null"], "oneOf": [{"type": "boolean"}, {}]}