Showing 28 of 460 total issues
Avoid too many return
statements within this function. Open
return reminderTypeOrdering[reminderA.reminderTypeKey] - reminderTypeOrdering[reminderB.reminderTypeKey];
Avoid too many return
statements within this function. Open
return reminderB.dueDate - reminderA.dismissedDate;
Avoid too many return
statements within this function. Open
return reminderTypeOrdering[reminderA.reminderTypeKey] - reminderTypeOrdering[reminderB.reminderTypeKey];
Avoid too many return
statements within this function. Open
return reminderB.dueDate - reminderA.dismissedDate;
Function updateEvent
has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring. Open
export const updateEvent = (requestBody, requestSession) => {
const database = sqlite(databasePath);
const nowMillis = Date.now();
const info = database.prepare("update LotteryEvents" +
" set reportDate = ?," +
- 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 getEvents
has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring. Open
export const getEvents = (requestBody: {
externalLicenceNumber?: string;
licenceTypeKey?: string;
organizationName?: string;
locationName?: string;
- 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 getEvents
has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring. Open
export const getEvents = (requestBody, requestSession, options) => {
const database = sqlite(databasePath, {
readonly: true
});
const sqlParameters = [];
- 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 updateEvent
has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring. Open
export const updateEvent = (requestBody: UpdateEventForm, requestSession: expressSession.Session): boolean => {
const database = sqlite(databasePath);
const nowMillis = Date.now();
- 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"