Showing 165 of 459 total issues
Function FormFileInput
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function FormFileInput({
input,
meta,
disabled,
uploadUrl,
- 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 handleRequestError
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const handleRequestError = async (response: Response, errorMessage: string) => {
if (response.ok) {
return;
}
const error = await response.json();
- 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
Avoid too many return
statements within this function. Open
return (
<OptionTag
spectrum={availableOption.spectrum}
label={availableOption.label}
value={availableOption.value}
Avoid too many return
statements within this function. Open
return (
<ReferenceComponent
entity={entityToOneReferenceFields?.[fieldName]}
id={value as string}
displayFrom={options.displayFrom}
Avoid too many return
statements within this function. Open
return permissions.includes(requiredPermission);
Avoid too many return
statements within this function. Open
return filterType;
Avoid too many return
statements within this function. Open
return new Date();
Avoid too many return
statements within this function. Open
return null;
Avoid too many return
statements within this function. Open
return operatorConfig[QueryOperators.BETWEEN](
query,
column,
timeBetween
);
Avoid too many return
statements within this function. Open
return i18n._(availableOption.label);
Function useEntityViewStateMachine
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const useEntityViewStateMachine = ({
crudAction,
entity,
error,
isLoading,
- 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 paginationFilterValidationImpl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
> = async (req, ignoreFieldsValidation) => {
const take = Number(req.query.take) || 10;
const page = Number(req.query.page) || 1;
const orderBy = req.query.orderBy === "desc" ? "desc" : "asc";
- 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 DropDownMenu
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function DropDownMenu({
menuItems: menuItems$1,
ellipsis,
ariaLabel,
contentClassName,
- 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 RenderFormInput
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function RenderFormInput(props: IRenderFormInputProps) {
const {
formProps: formProps$1,
label,
type,
- 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 BaseManageDashboardWidget
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function BaseManageDashboardWidget({ onSave, action }: IProps) {
const dashboardId = useRouteParam("dashboardId");
const widgetId = useRouteParam("widgetId");
const activeEntities = useActiveEntities();
const widgets = useDashboardWidgets(dashboardId);
- 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 BaseEntityForm
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function BaseEntityForm({
entity,
initialValuesData,
crudAction,
allOptional,
- 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 doesPermissionAllowPermission
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const doesPermissionAllowPermission = (
permissions: string[],
requiredPermission: string,
checkGranular: boolean
): boolean => {
- 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 SectionBox
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function SectionBox({
children,
title,
isLoading,
description,
- 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 useFEPagination
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function useFEPagination<T>(
endPoint: string,
dataState: IPaginatedDataState<T>
): UseQueryResult<PaginatedData<T>> {
return useQuery<PaginatedData<T>>({
- 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 Presentation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function Presentation({
isSubmitting,
disabled,
value,
error,
- 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"