IntroductionFunctionalityCalculates the cyclomatic complexity of each function. If it exceeds 8, a warning is given. UsageFor js/jsx/ts/tsx files, save the file to automatically trigger the check. Statistical RulesThe base value is 1, and each if, for, while, case, and ternary operator will add 1. Note that due to the special nature of frontend projects, &&, || will not increase the cyclomatic complexity. 介绍功能计算每个函数的圈复杂度,超过 8 则给出警告。 使用方法对于 js/jsx/ts/tsx 文件中,保存文件自动触发。 圈复杂度统计规则圈复杂度基础值为 1,每个 if、for、whilt、case以及三目运算法都会增加 1。 注意由于前端项目的特殊性, &&、|| 不会增加圈复杂度。 |