A webpack loader, computes complexity in JavaScript files.
npm i -D code-metrics-loader
at webpack.config.js:
{
module: {
rules: [{
enforce: 'pre',
test: /\.js$/,
exclude: /node_modules/,
use: [{
loader: 'code-metrics-loader',
options:{
errorLimit: 20
}
}],
}]
}
}