Showing 154 of 736 total issues
Function isTabbableRules
has a Cognitive Complexity of 103 (exceeds 5 allowed). Consider refactoring. Open
function isTabbableRules({
context,
except = {
flexbox: false,
scrollable: false,
- 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 isFocusRelevantRules
has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring. Open
function isFocusRelevantRules({
context,
except = {
flexbox: false,
scrollable: false,
- 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
File when.key.test.js
has 452 lines of code (exceeds 250 allowed). Consider refactoring. Open
define(function(require) {
'use strict';
var bdd = require('intern!bdd');
var expect = require('intern/chai!expect');
File is.tabbable.test.js
has 311 lines of code (exceeds 250 allowed). Consider refactoring. Open
define(function(require) {
'use strict';
var bdd = require('intern!bdd');
var expect = require('intern/chai!expect');
Function isFocusableRules
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
function isFocusableRules({
context,
except = {
disabled: false,
visible: false,
- 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
File is.focusable.test.js
has 297 lines of code (exceeds 250 allowed). Consider refactoring. Open
define(function(require) {
'use strict';
var bdd = require('intern!bdd');
var expect = require('intern/chai!expect');
Function exports
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(md/*, options */) {
md.core.ruler.push('container_example', function(state) {
const tokens = state.tokens;
let containerOpen;
let headingContent;
- 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
File is.only-tabbable.test.js
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
define(function(require) {
'use strict';
var bdd = require('intern!bdd');
var expect = require('intern/chai!expect');
Notes
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class Notes {
constructor(source, offset) {
// the source data
this.source = source;
// the result data
Function isOnlyTabbableRules
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function isOnlyTabbableRules({
context,
except = {
onlyFocusableBrowsingContext: false,
visible: false,
- 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
File is.focus-relevant.test.js
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
define(function(require) {
'use strict';
var bdd = require('intern!bdd');
var expect = require('intern/chai!expect');
Function queryFocusableStrict
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
export default function queryFocusableStrict({
context,
includeContext,
includeOnlyTabbable,
strategy,
- 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 default
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(map = {}) {
const bindings = {};
const context = nodeArray(map.context)[0] || document.documentElement;
delete map.context;
Function default
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export default function(map = {}) {
const bindings = {};
const context = nodeArray(map.context)[0] || document.documentElement;
delete map.context;
- 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 sorter
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sorter(order) {
order = order || [];
return function(one, two) {
let a = one.sidebar || one.title;
Function default
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export default function({ context } = {}) {
if (!context) {
context = document.documentElement;
}
- 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 isOnlyFocusRelevant
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function isOnlyFocusRelevant(element) {
const nodeName = element.nodeName.toLowerCase();
if (nodeName === 'embed' || nodeName === 'keygen') {
// embed is considered focus-relevant but not focusable
// see https://github.com/medialize/ally.js/issues/82
- 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 default
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export default function(context) {
if (!supports) {
supports = _supports();
}
- 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 createShadowDomStructure
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
var createShadowDomStructure = function(element) {
var input = {};
var root = {};
var firstShadowRoot = element.createShadowRoot();
Function exports
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(md, options) {
if (!options || !options.pattern || !options.url) {
throw new Error('the options "pattern" and "url" are required!');
}