Showing 92 of 92 total issues
Function getBrowserLogo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getBrowserLogo(id) {
if (id === 'ios_saf') {
id = 'safari-ios';
}
if (id === 'samsung') {
- 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 getBrowserLogo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getBrowserLogo(id) {
if (id === 'ios_saf') {
id = 'safari-ios';
}
if (id === 'samsung') {
- 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 get
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
get: function (obj, prop) {
if ('type' === prop) {
if (obj.isBlanked) {
return 'unknown';
}
- 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 makeSmallGroupOfferingObjects
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
async makeSmallGroupOfferingObjects(offerings) {
const smallGroupMode = this.args.smallGroupMode;
if (!smallGroupMode) {
return offerings;
}
- 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 moveFocus
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@action
moveFocus({ key, target }) {
switch (key) {
case 'ArrowDown':
if (target.nextElementSibling) {
- 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 getDataObjects
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
async getDataObjects(sessions) {
const sessionsWithMinutes = sessions.map(async (session) => {
const hours = await session.getTotalSumDuration();
return {
session,
- 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 compiledCalendarEvents
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
get compiledCalendarEvents() {
if (this.args.selectedView === 'day') {
return this.args.calendarEvents;
} else {
const hashedEvents = {};
- 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 requiredPublicationIssues
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
get requiredPublicationIssues() {
const issues = [];
if (this.isIndependentLearning) {
if (!this._ilmSession?.dueDate) {
issues.push('dueDate');
- 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 moveFocus
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@action
moveFocus(event) {
const { key, target } = event;
switch (key) {
case 'ArrowDown':
- 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 moveFocus
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@action
moveFocus({ key, target }) {
switch (key) {
case 'ArrowDown':
if (target.nextElementSibling) {
- 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
Avoid too many return
statements within this function. Open
return 0;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return 0;
Avoid too many return
statements within this function. Open
return 0;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return spaceship(v.getTime(), w.getTime());
Avoid too many return
statements within this function. Open
return Array.from(Object.values(maybeArray));
Avoid too many return
statements within this function. Open
return spaceship(v.localeCompare(w), 0);
Avoid too many return
statements within this function. Open
return 1;
Avoid too many return
statements within this function. Open
return 1;