Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve S3776 (cognitive-complexity): Don't increment nested functions' structural complexity #3500

Closed
ilia-kebets-sonarsource opened this issue Oct 25, 2022 · 0 comments · Fixed by SonarSource/eslint-plugin-sonarjs#444

Comments

@ilia-kebets-sonarsource
Copy link
Contributor

Based on discussions about:

We decided to not increment the structural complexity of nested functions in JS because JS has first-class functions, therefore they are used abundantly in a nested way, in patterns where the complexity is not raised.

However, we wish to maintain some restraint on nested functions by adopting rule S2004 for JS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant