src/brackets.js
Function brackets
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
Open
var brackets = (function (UNDEF) {
//
// Closure data
// --------------------------------------------------------------------------
//
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function brackets
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var brackets = (function (UNDEF) {
//
// Closure data
// --------------------------------------------------------------------------
//
Function split
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_brackets.split = function split (str, tmpl, _bp) {
// istanbul ignore next: _bp is for the compiler
if (!_bp) _bp = _cache
// Template text is easy: closing brackets are ignored, all we have to do is find
Avoid deeply nested control flow statements. Open
Open
if (match[1]) {
if (match[1] === ch) ++ix
else if (!--ix) break
} else {
rech.lastIndex = pushQBlock(match.index, rech.lastIndex, match[2])
Parsing error: The keyword 'export' is reserved Open
Open
export
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/