Skip to content

Instantly share code, notes, and snippets.

@oxocode
Created April 22, 2015 23:16
Show Gist options
  • Save oxocode/21bebbbea9e74fd462e8 to your computer and use it in GitHub Desktop.
Save oxocode/21bebbbea9e74fd462e8 to your computer and use it in GitHub Desktop.
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