Showing 69 of 132 total issues
Function Template$set
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function Template$set(templateStr, compile, compileOptions) {
check(templateStr, Match.OneOf(String, Function));
check(compile, Match.Optional(Function));
if (typeof templateStr == 'function')
- 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 setupBinding
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function setupBinding() {
var bindingConfig = this.config.binding;
if (!bindingConfig) return;
check(bindingConfig, {
- 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 hasTextAfterSelection
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function hasTextAfterSelection() {
var selection = window.getSelection();
if (! selection.isCollapsed) return true;
var text = selection.focusNode && selection.focusNode.textContent;
- 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 forEachNodesInRange
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function forEachNodesInRange(range, cb){
var rangeContainer = range.commonAncestorContainer
, doc = rangeContainer.ownerDocument;
function isNodeInsideRange(node){
- 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 parse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function parse() {
if (! this.node) return;
var value = this.get();
- 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 Scope$_safeAdd
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function Scope$_safeAdd(object, name) {
if (typeof name == 'string')
object.name = name;
else
name = object.name;
- 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 Component$destroy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function Component$destroy(opts) {
this.isReady = undefined;
if (typeof opts == 'boolean') opts = { quiet: opts };
else if (!opts) opts = {};
- 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 DOMStorage$set
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function DOMStorage$set(data) { // or arguments
if (typeof data == 'object')
_.eachKey(data, function(value, key) {
this.setItem(key, value);
}, this);
- 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 FacetedObject$addFacet
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function FacetedObject$addFacet(FacetClass, facetConfig, facetName, throwOnErrors) {
check(FacetClass, Function);
check(facetName, Match.Optional(String));
// first letter of facet name should be lowercase
- 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"