From 1078248099200d9cdbece1d7eccecb035ce7eb74 Mon Sep 17 00:00:00 2001 From: olistik Date: Wed, 8 Nov 2017 16:49:07 +0100 Subject: [PATCH] Avoids misleading IFs Single line IF statement can be misleading. See https://eslint.org/docs/rules/curly: > [..] it is considered by many to be best practice to never omit curly braces around blocks, even when they are optional, because it can lead to bugs and reduces code clarity. --- packages/eslint-config-accurapp/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/eslint-config-accurapp/index.js b/packages/eslint-config-accurapp/index.js index 143f3b6d..c2bbcb49 100644 --- a/packages/eslint-config-accurapp/index.js +++ b/packages/eslint-config-accurapp/index.js @@ -58,6 +58,7 @@ module.exports = { rules: Object.assign(standardJSRulesWarn, { // WARNINGS 'comma-dangle': [1, 'always-multiline'], // No risks, beacuse it will be transpiled + 'curly': [2, 'always'], 'space-before-function-paren': [1, { anonymous: 'always', named: 'never' }], 'key-spacing': [1, { beforeColon: false, afterColon: true, mode: 'minimum' }], 'object-curly-spacing': [1, 'always'],