JSCS Rules Overview
The JavaScript Code Style Checker's README is complete but turns out to be quite hard to parse at a glimpse. Here's a summary of all the 68 current rules as of May 2014 (1.4.3).
Watch out for plurals!
Rule name* | require | disallow | validate | type |
---|---|---|---|---|
Require / Disallow - 21 couples | ||||
CommaBeforeLineBreak | X | X | Boolean | |
KeywordsOnNewLine | X | X | Array | |
LeftStickedOperators | X | X | Array | |
RightStickedOperators | X | X | Array | |
MultipleVarDecl | X | X | Boolean | |
paddingNewLinesInBlocks | X | X | Boolean or Integer | |
SpaceAfterKeywords | X | X | Array | |
SpaceAfterObjectKeys | X | X | Boolean | |
SpaceAfterPrefixUnaryOperators | X | X | Array | |
SpaceAfterBinaryOperators | X | X | Array | |
SpaceBeforeBinaryOperators | X | X | Array | |
SpaceBeforeBlockStatements | X | X | Boolean | |
SpaceBeforePostfixUnaryOperators | X | X | Array | |
SpacesInAnonymousFunctionExpression | X | X | Object | |
SpacesInConditionalExpression | X | X | Object | |
SpacesInFunctionDeclaration | X | X | Object | |
SpacesInFunctionExpression | X | X | Object | |
SpacesInNamedFunctionExpression | X | X | Object | |
SpacesInsideArrayBrackets | X | X | Boolean | |
SpacesInsideObjectBrackets | X | X | Boolean | |
TrailingComma | X | X | Boolean | |
Require only - 9 rules | ||||
AlignedObjectValues | X | String | ||
BlocksOnNewline | X | Boolean or Integer | ||
CamelCaseOrUpperCaseIdentifiers | X | Boolean | ||
CapitalizedConstructors | X | Boolean | ||
CurlyBraces | X | Array | ||
DotNotation | X | Boolean | ||
LineFeedAtFileEnd | X | Boolean | ||
OperatorBeforeLineBreak | X | Array | ||
ParenthesesAroundIIFE | X | Boolean | ||
Disallow only - 11 rules | ||||
DanglingUnderscores | X | Boolean | ||
EmptyBlocks | X | Boolean | ||
ImplicitTypeConversion | X | Array | ||
Keywords | X | Array | ||
MixedSpacesAndTabs | X | Boolean or String | ||
MultipleLineBreaks | X | Boolean | ||
MultipleLineStrings | X | Boolean | ||
QuotedKeysInObjects | X | Boolean | ||
SpacesInsideParentheses | X | Boolean | ||
TrailingWhitespace | X | Boolean | ||
YodaConditions | X | Boolean | ||
Validate - 4 rules | ||||
Indentation | X | Integer or String | ||
JSDoc | X | Object | ||
LineBreaks | X | String | ||
QuoteMarks | X | String | ||
Misc (no prefix) - 2 rules | ||||
maximumLineLength | Integer | |||
safeContextKeyword | String |
* for convenience, "require", "disallow" or "validate" need to be appended.