eslint-disable-next-line complexity 是一条ESLint指令,用于临时禁用对下一行代码的复杂性检查。在ESLint中,“复杂性”(Complexity)是一个规则,用于衡量一个函数的逻辑复杂度。该规则通常根据函数中的条件语句、循环和函数调用的数量来评估函数的复杂度,以防止代码过于复杂而难以维护。 2. 说明这条指令在何种情况下...
[2, "last"],//逗号风格,换行时在行首还是行尾 "complexity": [0, 11],//循环复杂度 "computed-property-spacing": [0, "never"],//是否允许计算后的键名什么的 "consistent-return": 0,//return 后面是否允许省略 "consistent-this": [2, "that"],//this别名 "constructor-super": 0,//非派生...
"block-scoped-var": 2, //将变量声明放在合适的代码块里 "complexity": 0, //限制条件语句的复杂度 "consistent-return": 2, //无论有没有返回值都强制要求return语句返回一个值 "curly": ["error", "all"], //强制使用花括号的风格 "default-case": 0, //在switch语句中需要有default语句 "dot-...
I personally am not not convinced we should make this change, as allowing for arbitrary characters in disable comments adds a lot of complexity and surface area for bugs for what seems like very little gain. Adding the ability to do this feels like a mixing of responsibilities of comments tha...
ESLint version 8.0.0 What problem do you want to solve? ESLint currently allows users to disable rules. In large codebases with MANY Prs, some users disable lint rules without really knowing what they are doing. This slips by PRs because...
I'll reopen to see if someone wants to investigate the possibilities here, but I can't put it on the roadmap based on the complexity of the work. nzakas reopened this Jun 25, 2015 Copy link Quote reply Member mysticatea commented Jun 25, 2015 Hmm, I understand this requirement,...