Update eslintrc to more explicitly describe indentation rules.

This commit is contained in:
Rachel Fenichel
2018-01-16 16:43:22 -08:00
parent a4ec65d85d
commit 9072563a00

View File

@@ -2,7 +2,28 @@
"rules": {
"curly": ["error", "multi-line"],
"eol-last": ["error"],
"indent": ["warn", 2, {"SwitchCase": 1}], # Blockly/Google use 2-space indents
"indent": [
"error", 2, # Blockly/Google use 2-space indents
# Blockly/Google uses +4 space indents for line continuations.
{
"SwitchCase": 1,
"MemberExpression": 2,
"ObjectExpression": 1,
"FunctionDeclaration": {
"body": 1,
"parameters": 2
},
"FunctionExpression": {
"body": 1,
"parameters": 2
},
"CallExpression": {
"arguments": 2
},
# Ignore default rules for ternary expressions.
"ignoredNodes": ["ConditionalExpression"]
}
],
"linebreak-style": ["error", "unix"],
"max-len": ["error", 120, 4],
"no-trailing-spaces": ["error", { "skipBlankLines": true }],