Skip to content

Instantly share code, notes, and snippets.

@oxocode oxocode/.jscsrc
Created Apr 22, 2015

Embed
What would you like to do?
A JSCS WordPress Project Template
{
"disallowKeywordsOnNewLine": ["else"],
"disallowMixedSpacesAndTabs": "smart",
"disallowNewlineBeforeBlockStatements": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowTrailingWhitespace": true,
"requireBlocksOnNewline": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedComments": true,
"requireCapitalizedConstructors": true,
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"requireDotNotation": true,
// "requireLineBreakAfterVariableAssignment": true, // Doesn't work with for ( var i = 0, len = myArray.length; i < len; i++ )
"requireLineFeedAtFileEnd": true,
"requireOperatorBeforeLineBreak": true,
"requireSpaceAfterBinaryOperators": true,
"requireSpaceAfterKeywords": [
"do",
"for",
"if",
"else",
"switch",
"case",
"try",
"catch",
"void",
"while",
"with",
"return",
"typeof"
],
"requireSpaceAfterLineComment": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceBeforeBlockStatements": true,
"requireSpaceBeforeKeywords": [
"else",
"while",
"catch"
],
"requireSpaceBeforeObjectValues": true,
"requireSpaceBetweenArguments": true,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInConditionalExpression": {
"afterTest": true,
"beforeConsequent": true,
"afterConsequent": true,
"beforeAlternate": true
},
"requireSpacesInForStatement": true,
"requireSpacesInsideArrayBrackets": "all",
"requireSpacesInsideObjectBrackets": "all",
"requireSpacesInsideParentheses": {
"all": true,
"except": [
"{",
"}",
"[",
"]",
"function"
]
},
"requireYodaConditions": true,
"validateIndentation": "\t",
"validateParameterSeparator": ", ",
"validateQuoteMarks": "'"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.