From 7e4ac0fd73c04c1886f40aa46060e9717dce2f47 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Wed, 5 Aug 2020 23:16:51 +0000 Subject: [PATCH] Tools: Add complexity rule --- .eslintrc.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 6179499a2..df1d24f04 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -63,6 +63,10 @@ module.exports = { 'no-array-constructor': ['error'], 'radix': ['error'], + // Warn only for now because fixing everything would take too much + // refactoring, but new code should try to stick to it. + 'complexity': ['warn', { max: 10 }], + // Checks rules of Hooks 'react-hooks/rules-of-hooks': 'error', // Checks effect dependencies