diff --git a/.eslintrc.json b/.eslintrc.json index 9c3d4efbbf..d7ba5488b5 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,16 +9,19 @@ ], "env": { "node": true }, "rules": { + // Ensures array methods like .map() and .forEach() have return statements "array-callback-return": [ 2, { "allowImplicit": true } ], + // Disallows `if` statements as the only statement in an `else` block "no-lonely-if": 2, "no-proto": 2, "eqeqeq": [2, "smart"], "no-caller": 2, + // Encourages dot notation instead of brackets for property access "dot-notation": 2, "no-var": 2, "prefer-const": 2, @@ -28,10 +31,13 @@ "prefer-template": 2, "one-var": [2, "never"], "prefer-destructuring": [2, { "object": true }], + // Ensures comments start with a capital letter "capitalized-comments": 2, + // Enforces a consistent style for multiline comments "multiline-comment-style": [2, "starred-block"], "spaced-comment": 2, "yoda": [2, "never"], + // Requires curly braces for multi-line control statements "curly": [2, "multi-line"], "no-else-return": [