Showing 56 of 334 total issues
Function attachProduct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
productableId: number,
productableType: string,
token?: string | null,
options?: RequestOptionsInit
Function changeTermDate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
termId: number,
newDate: string,
token: string,
options?: RequestOptionsInit
Function sendProgress
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
courseId: number,
data: API.CourseProgressItemElement[],
token: string,
options?: RequestOptionsInit
Function h5pProgress
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
topicId: number,
statementId: string,
statement: API.IStatement,
token: string
Function bookConsultationDate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
token: string,
id: number,
term: string,
options?: RequestOptionsInit
Function updateTask
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
token: string,
id: number,
body: EscolaLms.Tasks.Http.Requests.UpdateTaskRequest,
options?: RequestOptionsInit
Function updateBookmarkNote
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
token: string,
id: number,
body: API.CreateBookmarkNote,
options?: RequestOptionsInit
Avoid too many return
statements within this function. Open
Open
return undefined;
Avoid too many return
statements within this function. Open
Open
return;
Avoid too many return
statements within this function. Open
Open
return response;
Avoid too many return
statements within this function. Open
Open
return error;
Avoid too many return
statements within this function. Open
Open
return response;
Avoid too many return
statements within this function. Open
Open
return error;
Avoid too many return
statements within this function. Open
Open
return null;
Function useLocalStorage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
export function useLocalStorage<T>(
storeKey: string,
key: string,
initialValue: T,
ssrHydration: boolean = false
- 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 TasksContextProvider
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
> = ({ children, defaults, apiUrl, ssrHydration }) => {
const abortControllers = useRef<Record<string, AbortController | null>>({});
const { token } = useContext(UserContext);
- 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"