Showing 94 of 144 total issues
Avoid too many return
statements within this function. Open
return `${start.format('MMM D')} - ${end.format('MMM D')}`;
Avoid too many return
statements within this function. Open
return HOUR_FLAG;
Avoid too many return
statements within this function. Open
return MERIDIAN_FLAG;
Avoid too many return
statements within this function. Open
return /A|a/;
Avoid too many return
statements within this function. Open
return handler.preventDefault();
Avoid too many return
statements within this function. Open
return i18n('this_week');
Avoid too many return
statements within this function. Open
return `${start.format('MMM D YYYY')} - ${end.format('MMM D YYYY')}`;
Avoid too many return
statements within this function. Open
return `${start.format('MMM D')} - ${end.format('MMM D YYYY')}`;
Function changeSection
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
changeSection(section) {
if (section === MERIDIAN_FLAG) {
section = HOUR_FLAG;
}
- 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 clean
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
clean(start, end) {
for(let i=start; i<=end; i++) {
if (i%this.selectRounder === 0) {
const { text, arm, plot } = this.at(i);
if (!isNone(text)) {
- 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 saveTimestamp
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
saveTimestamp(date) {
if (!get(this, 'isDestroyed') && get(this, 'timestamp') !== date.valueOf()) {
const bounds = isInBounds(date, get(this, 'minDate'), get(this, 'maxDate'));
if (bounds.isBefore || bounds.isAfter) {
set(this, 'invalidTime', true);
- 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 isDateInRange
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
isDateInRange: computed('value', function() {
// before render the position has not been set so
// resume calculations as if position were 0
let position = 0;
if (this.$() && this.$().length && !isEmpty(getData(this.$(), 'format'))) {
- 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 setActiveTime
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
setActiveTime() {
if (get(this, '_state') === 'inDOM') {
const value = this.getCurrentTimeByType(get(this, 'section'));
if (!isNone(value)) {
const clock = metaFor(this, get(this, 'section'));
- 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 focusState
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
focusState(section) {
let el = this.$(`input`);
if (el && el.length) {
let index;
if (!isEmpty(section)) {
- 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"