Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 68235c7

Browse files
author
Daniel Bader
committed
Beef up .eslintrc
1 parent 4a4242a commit 68235c7

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

javascript/.eslintrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
"Adaptive": true
1313
},
1414
"rules": {
15+
// K&R brace style, e.g. `if (x) {` <-- no new line before {
16+
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
17+
1518
// Enforce === instead of ==; !== instead of !=
1619
"eqeqeq": 2,
1720

@@ -48,6 +51,9 @@
4851
// Disallow mixed spaces and tabs for indentation
4952
"no-mixed-spaces-and-tabs": 2,
5053

54+
// Enforce 4 spaces indentation
55+
"indent": [2, 4, {"indentSwitchCase": true}],
56+
5157
// Disallow use of multiline strings
5258
"no-multi-str": 2,
5359

@@ -67,6 +73,9 @@
6773
// Enforce spacing before opening brace of block statements
6874
"space-before-blocks": [2, "always"],
6975

76+
// Disallow spaces before function parentheses
77+
"space-before-function-paren": [2, "never"],
78+
7079
// Enforce spaceing around infix operators: +, -, :, ?
7180
"space-infix-ops": 2,
7281

0 commit comments

Comments
 (0)