Showing 59 of 336 total issues
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 generateJitsy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
token: string,
id: number,
term: string,
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
Function updateConsultationAccess
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
token: string,
id: number,
body: API.ConsultationsAccessEnquiryUpdateRequest,
options?: RequestOptionsInit
Function getQuestionnaireStars
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
modelTypeTitle: string,
modelID: number,
id: number,
options?: RequestOptionsInit
Function addToCart
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
productId: number,
token?: string,
quantity?: number,
options?: RequestOptionsInit
Function payWithP24
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
email: string,
return_url: string,
token: string,
data?: API.InvoiceData
Function attachProduct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
productableId: number,
productableType: string,
token?: string | null,
options?: RequestOptionsInit
Function getQuestionnairesAnswer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
apiUrl: string,
modelTypeTitle: string,
modelID: number,
id: number,
params?: API.PaginationParams
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 response;
Avoid too many return
statements within this function. Open
Open
return undefined;
Avoid too many return
statements within this function. Open
Open
return error;
Avoid too many return
statements within this function. Open
Open
return null;
Avoid too many return
statements within this function. Open
Open
return error;
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"