From 957c7b2aecccc74aac15f88d47adf301eca5c46c Mon Sep 17 00:00:00 2001 From: Andrey Polischuk Date: Wed, 20 Mar 2024 14:27:25 +0300 Subject: [PATCH] fix(eslint-config): increase cognitive complexity --- packages/eslint-config/js.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/eslint-config/js.js b/packages/eslint-config/js.js index 7190b3b..466ca3f 100644 --- a/packages/eslint-config/js.js +++ b/packages/eslint-config/js.js @@ -1,3 +1,4 @@ +/* eslint-disable no-magic-numbers */ /** * @rushstack/eslint-patch is used to include plugins as dev * dependencies instead of imposing them as peer dependencies @@ -53,11 +54,9 @@ module.exports = { } ], 'dot-notation': 'error', - /* eslint-disable no-magic-numbers */ 'max-depth': ['error', 3], 'max-nested-callbacks': ['error', 3], 'max-params': ['error', 3], - /* eslint-enable no-magic-numbers */ 'max-classes-per-file': 'error', 'require-await': 'error', 'new-cap': 'error', @@ -203,6 +202,7 @@ module.exports = { 'sonar/stateful-regex': 'error', 'sonar/unused-named-groups': 'error', 'sonar/xpath': 'error', + 'sonarjs/cognitive-complexity': ['error', 20], 'security/detect-buffer-noassert': 'error', 'security/detect-child-process': 'error', 'security/detect-disable-mustache-escape': 'error',