dance2die/calendar-dates

View on GitHub

Showing 4 of 4 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

return dateMapper(lastDate)((_, i) => {
const date = i + 1;
currentDate.setDate(date);
return {
date,
Severity: Major
Found in src/dateutil.js and 1 other location - About 1 hr to fix
src/dateutil.js on lines 103..110

Similar blocks of code found in 2 locations. Consider refactoring.
Open

return dateMapper(length)((_, i) => {
const date = i + 1;
nextDate.setDate(date);
return {
date,
Severity: Major
Found in src/dateutil.js and 1 other location - About 1 hr to fix
src/dateutil.js on lines 59..66

Similar blocks of code found in 2 locations. Consider refactoring.
Open

const currentDates = getCurrentDates(date).map(({ date, iso }) => ({
date,
iso,
type: monthTypes.CURRENT
}));
Severity: Minor
Found in src/dateutil.js and 1 other location - About 55 mins to fix
src/dateutil.js on lines 28..32

Similar blocks of code found in 2 locations. Consider refactoring.
Open

const previousDates = getPreviousDates(date).map(({ date, iso }) => ({
date,
iso,
type: monthTypes.PREVIOUS
}));
Severity: Minor
Found in src/dateutil.js and 1 other location - About 55 mins to fix
src/dateutil.js on lines 33..37
Severity
Category
Status
Source
Language