Commit 8ae00b8e authored by Philip Chimento's avatar Philip Chimento 🚮

CI: Adjust eslint and clang-format rules [skip eslint]

parent e52498f8
...@@ -12,6 +12,7 @@ DerivePointerAlignment: false ...@@ -12,6 +12,7 @@ DerivePointerAlignment: false
ForEachMacros: [] ForEachMacros: []
IndentWidth: 4 IndentWidth: 4
PointerAlignment: Left # Google style allows both, but clang-format doesn't PointerAlignment: Left # Google style allows both, but clang-format doesn't
SpacesBeforeTrailingComments: 2
--- ---
# We rely mostly on eslint for JavaScript linting, but this is a lax collection # We rely mostly on eslint for JavaScript linting, but this is a lax collection
# of rules that will auto-fix some JS things. We really should use eslint --fix # of rules that will auto-fix some JS things. We really should use eslint --fix
...@@ -20,8 +21,9 @@ PointerAlignment: Left # Google style allows both, but clang-format doesn't ...@@ -20,8 +21,9 @@ PointerAlignment: Left # Google style allows both, but clang-format doesn't
Language: JavaScript Language: JavaScript
AlignAfterOpenBracket: DontAlign AlignAfterOpenBracket: DontAlign
AllowShortFunctionsOnASingleLine: false AllowShortFunctionsOnASingleLine: false
JavaScriptQuotes: Single JavaScriptQuotes: Leave # It's not smart enough to allow " to minimize escapes
PenaltyBreakBeforeFirstCallParameter: 1000000 PenaltyBreakBeforeFirstCallParameter: 1000000
PenaltyExcessCharacter: 1 PenaltyExcessCharacter: 1
SpacesBeforeTrailingComments: 2
SpacesInContainerLiterals: false SpacesInContainerLiterals: false
... ...
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
}, },
"extends": "eslint:recommended", "extends": "eslint:recommended",
"rules": { "rules": {
"array-bracket-spacing": ["error", "never"],
"brace-style": "error", "brace-style": "error",
"comma-spacing": [ "comma-spacing": [
"error", "error",
...@@ -19,6 +20,13 @@ ...@@ -19,6 +20,13 @@
"MemberExpression": "off" "MemberExpression": "off"
} }
], ],
"key-spacing": [
"error",
{
"beforeColon": false,
"afterColon": true
}
],
"keyword-spacing": [ "keyword-spacing": [
"error", "error",
{ {
...@@ -36,6 +44,7 @@ ...@@ -36,6 +44,7 @@
"allowEmptyCatch": true "allowEmptyCatch": true
} }
], ],
"nonblock-statement-body-position": ["error", "below"],
"quotes": [ "quotes": [
"error", "error",
"single", "single",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment