Showing 108 of 518 total issues
Avoid too many return
statements within this function. Open
return avail;
Avoid too many return
statements within this function. Open
if (typeof json.org !== 'string') return false;
Avoid too many return
statements within this function. Open
if (student?.name) return student.name;
Avoid too many return
statements within this function. Open
return localStorage.removeItem('email');
Avoid too many return
statements within this function. Open
return 0;
Avoid too many return
statements within this function. Open
if (subjects) return subjects;
Avoid too many return
statements within this function. Open
if (!isArray(json.subjects, isSubject)) return false;
Avoid too many return
statements within this function. Open
if (json.last && !isDateJSON(json.last)) return false;
Avoid too many return
statements within this function. Open
if (json.hash && typeof json.hash !== 'string') return false;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
if (json.exdates && !isArray(json.exdates, isDateJSON)) return false;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
if (!isAvailabilityJSON(json.availability)) return false;
Avoid too many return
statements within this function. Open
if (!isArray(json.tags, isUserTag)) return false;
Avoid too many return
statements within this function. Open
if (!isArray(json.people, isUserJSON)) return false;
Avoid too many return
statements within this function. Open
return true;
Function Card
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function Card<T extends Record<string, number> & { week: number }>({
data,
title,
children,
header,
- 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 DialogContent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function DialogContent({
page,
children,
forceMinHeight,
}: DialogContentProps): JSX.Element {
- 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 getMeetingVenue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function getMeetingVenue(
meeting: Meeting,
org: Org,
people: User[]
): 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 getPerson
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default async function getPerson(
{ id, roles, name }: Partial<User> & { id: string },
people: User[] = []
): Promise<User> {
if (!id) {
- 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"