Skip to content

Commit

Permalink
chore(lint): add branch's code style prefs
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-bansil committed Aug 3, 2016
1 parent 5a21afa commit ad71c87
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parser": "babel-eslint",
"env": { "browser": true },
"rules": {
"quotes": 0,
"strict": 0,
"no-underscore-dangle": 0,
"eqeqeq": 0,
"camelcase": 0,
"consistent-return": 0,
"new-cap": 0
},
"globals": {
"module": true,
"require": false,
"mixpanel": false,
"File": false
}
}
42 changes: 42 additions & 0 deletions .jscs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"fileExtensions": [".js", ".jsx"],
"esnext": true,

"requireCurlyBraces": [ "if", "else", "for", "while", "do", "try", "catch" ],
"requireSpaceAfterKeywords": [ "if", "else", "for", "while", "do", "switch", "return", "try", "catch" ],
"requireSpaceBeforeBlockStatements": true,
"requireParenthesesAroundIIFE": true,
"requireSpacesInConditionalExpression": { "afterTest": true, "beforeConsequent": true, "afterConsequent": true, "beforeAlternate": true },
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
"disallowSpacesInFunctionExpression": { "beforeOpeningRoundBrace": true },
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true },
"disallowSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true },
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
"disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
"requireSpacesInFunction": { "beforeOpeningCurlyBrace": true },
"disallowSpacesInFunction": { "beforeOpeningRoundBrace": true },
"disallowSpacesInsideParentheses": true,
"requireSpacesInsideObjectBrackets": "all",
"requireSpacesInsideArrayBrackets": "all",
"disallowSpaceAfterObjectKeys": true,
"requireCommaBeforeLineBreak": true,
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--", ";"],
"disallowSpaceBeforeBinaryOperators": [ "," ],
"requireSpaceBeforeBinaryOperators": [ "=", "+", "-", "/", "*", "==", "===", "!=", "!==" ],
"requireSpaceAfterBinaryOperators": [ "=", ",", "+", "-", "/", "*", "==", "===", "!=", "!==" ],
"disallowMultipleLineStrings": true,
"validateLineBreaks": "LF",
"disallowMixedSpacesAndTabs": "smart",
"disallowTrailingWhitespace": true,
"disallowTrailingComma": true,
"requireKeywordsOnNewLine": [ "else" ],
"requireLineFeedAtFileEnd": true,
"requireCapitalizedConstructors": true,
"safeContextKeyword": [ "self" ],
"disallowYodaConditions": true,
"requireSpaceAfterLineComment": true,
"disallowNewlineBeforeBlockStatements": true
}

0 comments on commit ad71c87

Please sign in to comment.