.jscsrc
JSCS configuration file
.jscsrcjscsrc.json
Validate
Check your file against this schema
Opens the validator with this schema already loaded. Paste your
.jscsrc and it validates in your browser — nothing is uploaded.
Reference
Fields
Generated directly from the schema, following local
$refs, to two levels of nesting.
| Field | Type | Description |
|---|---|---|
additionalRules | array<string> | Path to load additional rules |
disallowAnonymousFunctions | anyOf | Requires that a function expression be named. Named functions provide more information in the error stack trace than anonymous functions. This option does not help if you use Arrow functions (ES6) which are always anonymous. |
disallowArrowFunctions | anyOf | Disallows arrow functions. |
disallowCapitalizedComments | anyOf | Requires the first alphabetical character of a comment to be lowercase. |
disallowCommaBeforeLineBreak | oneOf | Disallows commas as last token on a line in lists. |
disallowCurlyBraces | oneOf | — |
disallowDanglingUnderscores | oneOf | Disallows identifiers that start or end in _. Some popular identifiers are automatically listed as exceptions: __proto__ (javascript), _ (underscore.js), __filename (node.js global), __dirname (node.js global), super_ (node.js, used by |
disallowEmptyBlocks | oneOf | Disallows empty blocks (except for catch blocks). |
disallowFunctionDeclarations | anyOf | Disallows function declarations. |
disallowIdenticalDestructuringNames | anyOf | Disallows identical destructuring names for the key and value in favor of using shorthand destructuring. |
disallowIdentifierNames | oneOf | Disallows a specified set of identifier names. |
disallowImplicitTypeConversion | anyOf | Disallows implicit type conversion. |
disallowKeywordsInComments | oneOf | Disallows one or more keywords in comments. |
disallowKeywordsOnNewLine | anyOf | — |
disallowKeywords | anyOf | — |
disallowMixedSpacesAndTabs | anyOf | Requires lines to not contain both spaces and tabs consecutively, or spaces after tabs only for alignment if "smart |
disallowMultiLineTernary | anyOf | Disallows the test, consequent and alternate to be on separate lines when using the ternary operator. |
disallowMultipleLineBreaks | anyOf | Disallows multiple blank lines in a row. |
disallowMultipleLineStrings | anyOf | Disallows strings that span multiple lines without using concatenation. |
disallowMultipleSpaces | oneOf | Disallows multiple indentation characters (tabs or spaces) between identifiers, keywords, and any other token. |
disallowMultipleVarDecl | oneOf | Disallows multiple `var` declaration (except for-loop). |
disallowNamedUnassignedFunctions | anyOf | Disallows unassigned functions to be named inline. |
disallowNestedTernaries | oneOf | Disallows nested ternaries. |
disallowNewlineBeforeBlockStatements | oneOf | Disallows newline before opening curly brace of all block statements. |
disallowNodeTypes | anyOf | — |
disallowNotOperatorsInConditionals | anyOf | Disallows the not, not equals, and strict not equals operators in conditionals. |
disallowObjectKeysOnNewLine | anyOf | Disallows placing object keys on new line. |
disallowOperatorBeforeLineBreak | anyOf | — |
disallowPaddingNewLinesAfterBlocks | anyOf | Disallow a newline after blocks. |
disallowPaddingNewLinesAfterUseStrict | anyOf | Disallow a blank line after 'use strict'; statements. |
disallowPaddingNewLinesBeforeExport | anyOf | Disallows newline before module.exports. |
disallowPaddingNewlinesBeforeKeywords | oneOf | — |
disallowPaddingNewLinesBeforeLineComments | oneOf | Disallows newline before line comments. |
disallowPaddingNewlinesInBlocks | oneOf | Disallows blocks from beginning or ending with 2 newlines. |
disallowPaddingNewLinesInObjects | anyOf | Disallows newlines adjacent to curly braces in all object literals. |
disallowParenthesesAroundArrowParam | anyOf | Disallows parentheses around arrow function expressions that contain a single parameter. |
disallowQuotedKeysInObjects | oneOf | Disallows quoted keys in object if possible. |
disallowSemicolons | anyOf | Disallows lines from ending in a semicolon. |
disallowShorthandArrowFunctions | anyOf | Require arrow functions to use a block statement (explicit return). |
disallowSpaceAfterBinaryOperators | anyOf | — |
disallowSpaceAfterComma | oneOf | Disallows spaces after commas. |
disallowSpaceAfterKeywords | oneOf | — |
disallowSpaceAfterLineComment | anyOf | Requires that a line comment (//) not be followed by a space. |
disallowSpaceAfterObjectKeys | oneOf | Disallows space after object keys. |
disallowSpaceAfterPrefixUnaryOperators | anyOf | — |
disallowSpaceBeforeBinaryOperators | anyOf | — |
disallowSpaceBeforeBlockStatements | anyOf | Disallows space before block statements (for loops, control structures). |
disallowSpaceBeforeComma | oneOf | Disallows spaces before commas. |
disallowSpaceBeforeKeywords | oneOf | — |
disallowSpaceBeforeObjectValues | anyOf | Disallows space before object values. |
disallowSpaceBeforePostfixUnaryOperators | anyOf | — |
disallowSpaceBeforeSemicolon | oneOf | Disallows spaces before semicolons. |
disallowSpaceBetweenArguments | anyOf | Ensure there are no spaces after argument separators in call expressions. |
disallowSpacesInAnonymousFunctionExpression | anyOf | — |
disallowSpacesInCallExpression | anyOf | Disallows space before () in call expressions. |
disallowSpacesInConditionalExpression | anyOf | Disallows space before and/or after ? or : in conditional expressions. |
disallowSpacesInForStatement | anyOf | Disallow spaces in between for statement. |
disallowSpacesInFunction | anyOf | — |
disallowSpacesInFunctionDeclaration | anyOf | — |
disallowSpacesInFunctionExpression | anyOf | — |
disallowSpacesInGenerator | oneOf | Disallow space before or after * in generator functions. |
disallowSpacesInNamedFunctionExpression | anyOf | — |
disallowSpacesInsideArrayBrackets | oneOf | Disallows space after opening array square bracket and before closing. Reports only on arrays, not on property accessors. Use disallowSpacesInsideBrackets to report on all brackets. |
disallowSpacesInsideBrackets | oneOf | Disallows space after opening square bracket and before closing. Reports on all on brackets, even on property accessors. Use disallowSpacesInsideArrayBrackets to exclude property accessors. |
disallowSpacesInsideObjectBrackets | oneOf | Disallows space after opening object curly brace and before closing. |
disallowSpacesInsideParentheses | oneOf | Disallows space after opening round bracket and before closing. |
disallowSpacesInsideParenthesizedExpression | oneOf | Disallows space after opening and before closing grouping parentheses. |
disallowSpacesInsideTemplateStringPlaceholders | oneOf | Disallows spaces before and after curly brace inside template string placeholders. |
disallowTabs | oneOf | Disallows tabs everywhere. |
disallowTrailingComma | oneOf | Disallows an extra comma following the final element of an array or object literal. |
disallowTrailingWhitespace | oneOf | Requires all lines to end on a non-whitespace character. Use "ignoreEmptyLines" to allow whitespace on empty lines (default is false). default: false |
disallowUnusedParams | oneOf | Disallows unused params in function expression and function declaration. |
disallowVar | oneOf | Disallows declaring variables with var. |
disallowYodaConditions | anyOf | — |
excludeFiles | array<string> | Disables style checking for specified paths. |
jsDoc | object | Validate jsdoc comments. |
jsDoc.checkAnnotations | oneOf | Checks whether tag names are valid. |
jsDoc.checkParamExistence | anyOf | Checks whether all parameters are documented. |
jsDoc.checkParamNames | anyOf | Checks whether param names in jsdoc and in function declaration are equal. |
jsDoc.requireParamTypes | anyOf | Checks whether params in jsdoc contains type. |
jsDoc.checkRedundantParams | anyOf | Reports redundant params in jsdoc. |
jsDoc.checkReturnTypes | anyOf | Checks for differences between the jsdoc and actual return types if both exist. |
jsDoc.checkRedundantReturns | anyOf | Report statements for functions without a return, which are described with an @return tag. |
jsDoc.requireReturnTypes | anyOf | Checks whether @returns in jsdoc contains type. |
jsDoc.checkTypes | oneOf | Reports invalid types for bunch of tags. |
jsDoc.checkRedundantAccess | oneOf | Reports redundant access declarations. |
jsDoc.leadingUnderscoreAccess | oneOf | Checks whether access declaration is set for _underscored function names. Ignores a bunch of popular identifiers: __filename, __dirname, __proto__, __defineGetter__, super_, __constructor, etc. |
jsDoc.enforceExistence | oneOf | Checks whether jsdoc block exists. |
jsDoc.requireHyphenBeforeDescription | anyOf | Checks whether a jsdoc param description has a hyphen before it (checks for -). |
jsDoc.requireNewlineAfterDescription | anyOf | Checks whether a jsdoc comment description has a padding (trailing) newline separator between it and additional @tags. |
jsDoc.disallowNewlineAfterDescription | anyOf | Checks whether a jsdoc comment description has no padding (trailing) newline separator between it and additional @tags. |
jsDoc.requireDescriptionCompleteSentence | anyOf | Checks whether a jsdoc comment description is a complete sentence. A complete sentence is defined as starting with an upper case letter and ending with a period. |
jsDoc.requireParamDescription | anyOf | Checks whether a jsdoc param description exists. |
jsDoc.requireReturnDescription | anyOf | Checks whether a jsdoc return description exists. |
maximumLineLength | oneOf | Requires all lines to be at most the number of characters specified. |
maximumNumberOfLines | oneOf | Requires the file to be at most the number of lines specified. |
preset | string | Extends defined rules with preset rules. one of: "airbnb", "crockford", "google", "grunt", "idiomatic", "jquery" … (+5) |
requireAlignedMultilineParams | oneOf | Enforces indentation of parameters in multiline functions. |
requireAlignedObjectValues | oneOf | Requires proper alignment in object literals. |
requireAnonymousFunctions | oneOf | Requires that a function expression be anonymous. |
requireArrayDestructuring | oneOf | Requires that variable assignment from array values are * destructured. |
requireArrowFunctions | oneOf | Requires that arrow functions are used instead of anonymous function expressions in callbacks. |
requireBlocksOnNewline | oneOf | Requires blocks to begin and end with a newline. |
requireCamelCaseOrUpperCaseIdentifiers | oneOf | Requires identifiers to be camelCased or UPPERCASE_WITH_UNDERSCORES. |
requireCapitalizedComments | oneOf | Requires the first alphabetical character of a comment to be uppercase, unless it is part of a multi-line textblock. This rule automatically ignores jscs, jshint, eslint, and istanbul specific comments. |
requireCapitalizedConstructorsNew | oneOf | Requires capitalized constructors to to use the new keyword. |
requireCapitalizedConstructors | oneOf | Requires constructors to be capitalized (except for "this") |
requireCommaBeforeLineBreak | oneOf | Requires commas as last token on a line in lists. |
requireCurlyBraces | oneOf | 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. |
requireDollarBeforejQueryAssignment | oneOf | Require a $ before variable names that are jquery assignments. |
requireDotNotation | oneOf | Requires member expressions to use dot notation when possible. |
requireEarlyReturn | oneOf | Requires early return in a function. |
requireEnhancedObjectLiterals | oneOf | Requires declaring objects via ES6 enhanced object literals. |
requireFunctionDeclarations | oneOf | 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 |
requireImportAlphabetized | oneOf | Requires imports to be alphabetized (A-Z). |
requireKeywordsOnNewLine | anyOf | — |
requireLineBreakAfterVariableAssignment | oneOf | Requires placing line feed after assigning a variable. |
requireLineFeedAtFileEnd | oneOf | Requires placing line feed at file end. |
requireMatchingFunctionName | oneOf | 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 |
requireMultiLineTernary | oneOf | Requires the test, consequent and alternate to be on separate lines when using the ternary operator. |
requireMultipleVarDecl | oneOf | Requires multiple `var` declaration. |
requireNamedUnassignedFunctions | oneOf | Require unassigned functions to be named inline. |
requireNewlineBeforeBlockStatements | oneOf | — |
requireNumericLiterals | oneOf | Requires use of binary, hexadecimal, and octal literals instead of parseInt. |
requireObjectDestructuring | oneOf | Requires variable declarations from objects via destructuring. |
requireObjectKeysOnNewLine | oneOf | Requires placing object keys on new line. |
requireOperatorBeforeLineBreak | anyOf | — |
requirePaddingNewLineAfterVariableDeclaration | oneOf | Requires an extra blank newline after var declarations, as long as it is not the last expression in the current block. |
requirePaddingNewLinesAfterBlocks | oneOf | Requires newline after blocks. |
requirePaddingNewLinesAfterUseStrict | oneOf | Requires a blank line after 'use strict'; statements. |
requirePaddingNewLinesBeforeExport | oneOf | Requires newline before module.exports. |
requirePaddingNewlinesBeforeKeywords | oneOf | — |
requirePaddingNewLinesBeforeLineComments | oneOf | Requires newline before line comments. |
requirePaddingNewlinesInBlocks | oneOf | Requires blocks to begin and end with 2 newlines. |
requirePaddingNewLinesInObjects | oneOf | Requires newline inside curly braces of all objects. |
requireParenthesesAroundArrowParam | oneOf | Requires parentheses around arrow function expressions with a single parameter. |
requireParenthesesAroundIIFE | oneOf | Requires parentheses around immediately invoked function expressions. |
requireQuotedKeysInObjects | oneOf | Requires quoted keys in objects. |
requireSemicolons | oneOf | Requires semicolon after: var declaration, expression statement, return, throw, break, continue, do-while. |
requireShorthandArrowFunctions | oneOf | Require arrow functions to use an expression body when returning a single statement (no block statement, implicit return). |
requireSpaceAfterBinaryOperators | anyOf | — |
requireSpaceAfterComma | oneOf | Requires space after comma. |
requireSpaceAfterKeywords | oneOf | — |
requireSpaceAfterLineComment | oneOf | Requires that a line comment (`//`) be followed by a space. |
requireSpaceAfterObjectKeys | oneOf | Requires space after object keys. |
requireSpaceAfterPrefixUnaryOperators | anyOf | — |
requireSpaceBeforeBinaryOperators | anyOf | — |
requireSpaceBeforeBlockStatements | oneOf | Requires space before block statements (for loops, control structures). |
requireSpaceBeforeComma | oneOf | Requires a space before a comma. |
requireSpaceBeforeKeywords | oneOf | Requires a space before a keyword. |
requireSpaceBeforeObjectValues | oneOf | Requires space after object keys. |
requireSpaceBeforePostfixUnaryOperators | anyOf | — |
requireSpaceBetweenArguments | oneOf | Ensure there are spaces after argument separators in call expressions. |
requireSpacesInAnonymousFunctionExpression | oneOf | Requires space before `()` or `{}` in function expressions (both named and anonymous). |
requireSpacesInCallExpression | oneOf | Requires space before `()` in call expressions. |
requireSpacesInConditionalExpression | oneOf | Requires space before and/or after `?` or `:` in conditional expressions. |
requireSpacesInForStatement | oneOf | Requires spaces in between `for` statement. |
requireSpacesInFunction | anyOf | — |
requireSpacesInFunctionDeclaration | anyOf | — |
requireSpacesInFunctionExpression | anyOf | — |
requireSpacesInGenerator | oneOf | Requires space before and after `*` in generator functions. |
requireSpacesInNamedFunctionExpression | anyOf | — |
requireSpacesInsideArrayBrackets | oneOf | Requires space after opening array square bracket and before closing. Reports only on arrays, not on property accessors. Use requireSpacesInsideBrackets to report on all brackets. |
requireSpacesInsideBrackets | oneOf | Requires space after opening square bracket and before closing. Reports on all on brackets, even on property accessors. Use requireSpacesInsideArrayBrackets to exclude property accessors. |
requireSpacesInsideObjectBrackets | oneOf | Requires space after opening object curly brace and before closing. |
requireSpacesInsideParentheses | oneOf | Requires space after opening round bracket and before closing. |
requireSpacesInsideParenthesizedExpression | oneOf | Requires space after opening and before closing grouping parentheses. |
requireSpread | oneOf | Disallows using `.apply` in favor of the spread operator. |
requireTemplateStrings | oneOf | Requires the use of template strings instead of string concatenation. |
requireTrailingComma | oneOf | Requires an extra comma following the final element of an array or object literal. |
requireVarDeclFirst | oneOf | Requires `var` declaration to be on the top of an enclosing scope. |
requireYodaConditions | oneOf | Requires the variable to be the right hand operator when doing a boolean comparison. An array of quoted operators can be supplied to indicate which operators requires yoda conditions. |
safeContextKeyword | oneOf | Option to check `var that = this` expressions. |
validateAlignedFunctionParameters | oneOf | Validates proper alignment of function parameters. |
validateCommentPosition | oneOf | This rule is for validating the positioning of line comments. Block comments are ignored. Comments that start with the following keywords are also ignored: `eslint`, `jshint`, `jslint`, `istanbul`, `global`, `exported`, `jscs`, `falls |
validateIndentation | oneOf | Validates indentation for switch statements and block statements. |
validateLineBreaks | oneOf | Option to check line break characters. |
validateNewlineAfterArrayElements | oneOf | Requires each element in array on a single line when array length is more than passed maximum number or array fills more than one line. |
validateOrderInObjectKeys | oneOf | Validates the order in object keys. |
validateParameterSeparator | oneOf | Enable validation of separators between function parameters. Will ignore newlines. |
validateQuoteMarks | oneOf | Requires all quote marks to be either the supplied value, or consistent if `true`. |
Audit
What we found in this schema
- Declared draft: draft-07
- Validates cleanly against its own meta-schema.
- 280 properties, 91% carrying a description, max nesting depth 12.
Standards
Specification sections for the keywords in this schema
| Keyword | Document | Section |
|---|---|---|
$id | JSON Schema Core, draft 2020-12 | §8.2.1 — The "$id" Keyword |
$ref | JSON Schema Core, draft 2020-12 | §8.2.3.1 — Direct References with "$ref" |
$schema | JSON Schema Core, draft 2020-12 | §8.1.1 — "$schema" |
additionalProperties | JSON Schema Core, draft 2020-12 | §10.3.2.3 — "additionalProperties" |
anyOf | JSON Schema Core, draft 2020-12 | §10.2.1.2 — "anyOf" |
const | JSON Schema Validation, draft 2020-12 | §6.1.3 — "const" |
default | JSON Schema Validation, draft 2020-12 | §9.2 — "default" |
description | JSON Schema Validation, draft 2020-12 | §9.1 — "title" and "description" |
enum | JSON Schema Validation, draft 2020-12 | §6.1.2 — "enum" |
items | JSON Schema Core, draft 2020-12 | §10.3.1.2 — "items" |
maxLength | JSON Schema Validation, draft 2020-12 | §6.3.1 — "maxLength" |
minItems | JSON Schema Validation, draft 2020-12 | §6.4.2 — "minItems" |
minLength | JSON Schema Validation, draft 2020-12 | §6.3.2 — "minLength" |
minimum | JSON Schema Validation, draft 2020-12 | §6.2.4 — "minimum" |
oneOf | JSON Schema Core, draft 2020-12 | §10.2.1.3 — "oneOf" |
properties | JSON Schema Core, draft 2020-12 | §10.3.2.1 — "properties" |
required | JSON Schema Validation, draft 2020-12 | §6.5.3 — "required" |
type | JSON Schema Validation, draft 2020-12 | §6.1.1 — "type" |
uniqueItems | JSON Schema Validation, draft 2020-12 | §6.4.3 — "uniqueItems" |
Documents
- JSON Schema Core, draft 2020-12 — JSON Schema: A Media Type for Describing JSON Documents, A. Wright, H. Andrews, B. Hutton, G. Dennis, Eds., 2022. draft-bhutton-json-schema-01. An expired Internet-Draft with no formal standing in the IETF standards process; it is nonetheless the specification of record for JSON Schema 2020-12, published by json-schema.org.
- JSON Schema Validation, draft 2020-12 — JSON Schema Validation: A Vocabulary for Structural Validation of JSON, A. Wright, H. Andrews, B. Hutton, Eds., 2022.
- RFC 8259 (STD 90) — The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray, Ed., 2017. The format a schema describes.
- RFC 6901 — JavaScript Object Notation (JSON) Pointer. Defines the pointer syntax used by $ref fragments and the ~0 / ~1 escapes.
Source
Attribution
This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.