Javascript: Why complexity is off?

Created on 7 Mar 2018  路  4Comments  路  Source: airbnb/javascript

Most helpful comment

In practice, it's not a very useful metric.

All 4 comments

In practice, it's not a very useful metric.

Why is not useful?, in teory could evoid complexity, not?

For me, more better metric and more quality code you will get if you combine:

max-params, max-statements, max-statements-per-line, max-nested-callbacks and max-depth.

Don't know how complexity is actually implemented, but above rules are more fine grained and leads you to great code.

In almost my whole life i didn't needed more than 15 statements and 5 nested-callbacks/max-depth - there is always a way to refactor and extract, except some rare scenarios.

@yeion7 that's the theory. In practice, it doesn't really help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ryankask picture ryankask  路  3Comments

ar
mbifulco picture mbifulco  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments

progre picture progre  路  3Comments

kozhevnikov picture kozhevnikov  路  3Comments