Skip to content

Instantly share code, notes, and snippets.

@ahomu
Created March 4, 2014 01:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahomu/9338225 to your computer and use it in GitHub Desktop.
Save ahomu/9338225 to your computer and use it in GitHub Desktop.
おれのコーディングスタイル (仮) https://github.com/mdevils/node-jscs
{
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return",
"try",
"catch"
],
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowRightStickedOperators": ["?", "+", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireRightStickedOperators": ["!"],
"requireLeftStickedOperators": [","],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowImplicitTypeConversion": ["string"],
"disallowKeywords": ["with", "eval"],
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
"disallowKeywordsOnNewLine": ["else"],
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"disallowEmptyBlocks": true,
"disallowQuotedKeysInObjects": "allButReserved",
"disallowYodaConditions": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true,
"requireAlignedObjectValues": "skipWithLineBreak",
"requireCommaBeforeLineBreak": true,
"requireBlocksOnNewline": true,
"requireLineFeedAtFileEnd": true,
"requireParenthesesAroundIIFE": true,
"requireMultipleVarDecl": true,
"safeContextKeyword": true,
"excludeFiles": ["test/data/**"],
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"validateJSDoc": {
"checkParamNames": true,
"requireParamTypes": true
},
"validateLineBreaks": "LF",
"validateIndentation": 2,
"validateQuoteMarks": "'"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment